Skip to content

Latest commit

 

History

History

hooks

WunderGraph Hooks

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.

Getting Started

  1. Install the dependencies and run the complete example in one command:
npm install && npm start

After npm start has been executed, your browser should open a new tab and navigate to http://localhost:9991/operations/Dragons. In the console, you can see logs emitted by the mutatingPostResolve hook.

TS operation

curl -N http://localhost:9991/operations/users/get?id=1

Learn More

Read the Docs.

Deploy to WunderGraph Cloud

Deploy to WunderGraph

Got Questions?

Join us on Discord!