Skip to content

Access document instance in onResolution hook #577

Answered by salmanm
salmanm asked this question in Q&A
Discussion options

You must be logged in to vote

If we look at the function signature, document should be before context in onResolution. But then that would be a breaking change!

preExecution
fastify.graphql.addHook('preExecution', async (schema, document, context) => {
onResolution
fastify.graphql.addHook('onResolution', async (execution, context) => {

For now, I'll just use this feature. Didn't know it exists. 😄

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mcollina
Comment options

@dillonius01
Comment options

Answer selected by mcollina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants