Skip to main content

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

stellate_strawberry-1.1.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

stellate_strawberry-1.1.1-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page