Skip to Content

postResolveHook Configuration

Published: October 19, 2021

The postResolve Hook runs directly after the Operation was resolved. As it's not a mutating Hook, you're not able to manipulate the Response.

Here's an example:

const wunderGraphHooks = ConfigureWunderGraphHooks({
queries: {
Missions: {
// generated
async postResolve(ctx: Context, input: MissionsInput, response: MissionsResponse) {
console.dir({ctx,input,response}); // user defined
}
}
},
})

You're able to invoke side effects, send E-Mails based on the response, etc...


Product

Subscribe to our newsletter!

Stay informed when great things happen! Get the latest news about APIs, GraphQL and more straight into your mailbox.

© 2021 WunderGraph