Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrappers + Apollo Tracing #165

Merged
merged 13 commits into from
Jan 17, 2020
Merged

Wrappers + Apollo Tracing #165

merged 13 commits into from
Jan 17, 2020

Conversation

ghostdogpr
Copy link
Owner

@ghostdogpr ghostdogpr commented Jan 13, 2020

Fixes #99
Fixes #133
Fixes #157

You can use GraphQL#withWrapper or @@ to register a function that will wrap the execution of the query processing (or only a part of it).

There are 5 types of wrappers:

  • OverallWrapper to wrap the whole query processing
  • ParsingWrapper to wrap the query parsing only
  • ValidationWrapper to wrap the query validation only
  • ExecutionWrapper to wrap the query execution only
  • FieldWrapper to wrap each field execution

Existing query analyzers have been replaced by simple wrappers using ValidationWrapper.

# Conflicts:
#	core/src/main/scala/caliban/GraphQLResponse.scala
@ghostdogpr
Copy link
Owner Author

cc @rtimush FYI, I reimplemented the query analyzers using this more powerful wrapper feature.

@ghostdogpr ghostdogpr merged commit b461fb1 into master Jan 17, 2020
@ghostdogpr ghostdogpr deleted the Wrappers branch January 17, 2020 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors: add path Add module for apollo-tracing support Ability to wrap field execution
3 participants