Skip to content

The GraphQL library should allow you to track a specific query #278

@bbakerman

Description

@bbakerman

There is no unique identifier in the library that allows you to truly track execution of a query

I realised this when putting together the PR for #270 together.

There are 2 stages to query execution (parse/validate then execute)

There is no common object passed between them.

graphql.execution.Execution builds a graphql.execution.ExecutionContext which is probably our best bet but its done AFTER the parse/validate

Also graphql.schema.DataFetchingEnvironment is not given this execution context and if there was a unique identifier in it would not be available to DataFetchers

I propose that the GraphQL library generate a UUID (and take one for people using other request identifiers such as Zipkin spans)

This would be passed down through graphql.execution.ExecutionContext / graphql.schema.DataFetchingEnvironment etc.. so code can "track / known" what theya re doding work for

For example a multi threaded query executor service could log / instrument better in terms of the UUID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions