Integrate Stellate with your Strawberry GraphQL API
Project description
stellate-strawberry
This package integrates your Strawberry GraphQL API with Stellate. It does so by providing you with an Extension that you can add to your schema with one line of code.
Installation
Simply install the package using pip
:
pip install stellate-strawberry
Set Up
Before you can make use of this library, you need to set up a Stellate service and create a logging token.
After that, add the Stellate extension when initializing your strawberry.Schema
object in order to add Stellate Metrics Logging:
from stellate_strawberry import create_stellate_extension
service_name = "my-service" # The name of your Stellate service
token = "stl8_xyz" # The logging token for above service
schema = strawberry.Schema(
query=Query,
extensions=[create_stellate_extension(service_name, token)]
)
Stellate GraphQL Metrics are even more powerful if Stellate knows about your GraphQL schema. Set up automatic schema synchronization like so:
from stellate_strawberry import sync_schema_to_stellate
service_name = "my-service" # The name of your Stellate service
token = "stl8_xyz" # The logging token for above service
schema = strawberry.Schema(query=Query)
sync_schema_to_stellate(schema, service_name, token)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for stellate_strawberry-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14c06a3249c478112dcc44c6f57d9035158224ba940f46e4478d48faa3e129e0 |
|
MD5 | 2b39454f113ffaa7f85cc0b1726d5b52 |
|
BLAKE2b-256 | 8d8bfda6e2be5cf638c54d7926a07fd86ef02314ae9e64607d6247e4f2b89122 |
Hashes for stellate_strawberry-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3dcac9f10c1073d9d03c8dad8f110fe8913a8942fa5417c9fba49d672d3b213 |
|
MD5 | 86fdbb8b226e89ee10d7f3c321b3f421 |
|
BLAKE2b-256 | d696d12ff465930cca48ab2337d847c08ac5871c1fe9b8eb6130e72b2a6d938f |