This example demonstrates how to use the mutatingPostResolve hook to change the response of the Dragons operation. Hooks are the type-safe way to write custom middleware functions. If you need an overview about all possible hooks, please refer to the WunderGraph Hooks documentation.
Install the dependencies and run the complete example in one command:
npm install && npm startAfter npm start has been executed, your browser should open a new tab and navigate to http://localhost:9991/app/main/operations/Dragons. In the console, you can see logs emitted by the mutatingPostResolve hook.
Read the Docs.
Join us on Discord!