postResolve Hook Configuration
Published: 2022-05-23
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: {// generatedasync 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...