mutatingPreResolve hook
The mutatingPreResolve
hook is called before the Operation gets resolved. You're able to modify the input before it gets passed to the resolvers. Supported operations are queries
, mutations
and subscriptions
.
Similar to all other hooks, the mutatingPreResolve
hook is called with the following parameters:
user
: The user object when the user is authenticatedclientRequest
: The original client request object, including Headerslog
: The logger objectoperations
: The operations client, used to call other (internal) operationsinput
: The input object (only for Operation hooks)
With the operations
client, you're able to securely call into all defined Operations, e.g. to talk to a database or another service to enrich a response or manipulate the inputs of an Operation.
1
2
3
4
5
6
7
8
9
10
11
12