Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.05 KB

File metadata and controls

64 lines (46 loc) · 1.05 KB
title summary tags
Apollo Tracing
Add Apollo tracing to your GraphQL server.
tracing

ApolloTracingExtension

This extension adds tracing information to your response for Apollo Engine.

Usage example:

import strawberry
from strawberry.extensions.tracing import ApolloTracingExtension


@strawberry.type
class Query:
    @strawberry.field
    def hello(self) -> str:
        return "Hello, world!"


schema = strawberry.Schema(
    Query,
    extensions=[
        ApolloTracingExtension,
    ],
)

If you are not running in an Async context then you'll need to use the sync version:

import strawberry
from strawberry.extensions.tracing import ApolloTracingExtensionSync


@strawberry.type
class Query:
    @strawberry.field
    def hello(self) -> str:
        return "Hello, world!"


schema = strawberry.Schema(
    Query,
    extensions=[
        ApolloTracingExtensionSync,
    ],
)

API reference:

No arguments