graphql_pre_mutate_and_get_payload
apply_filters( 'graphql_pre_mutate_and_get_payload', null, $this->mutation_name, $this->config['mutateAndGetPayload'], $input, $context, $info );
Filter to short circuit the mutateAndGetPayload callback. Returning anything other than null will stop the callback for the mutation from executing, and will return your data or execute your callback instead.
- Type: filter
- Group: Request Lifecycle
- Since: 0.0.5
- Source File:
plugins/wp-graphql/src/Type/WPMutationType.php
Parameters
$payload.(array<string,mixed>|callable|null): The payload returned from the callback. Null by default.$mutation_name(string): The name of the mutation field.$mutateAndGetPayload(callable|\Closure): The callback for the mutation.$input(array<string,mixed>): The mutation input args.$context(\WPGraphQL\AppContext): The AppContext object.$info(\GraphQL\Type\Definition\ResolveInfo): The ResolveInfo object.
Source
apply_filters( 'graphql_pre_mutate_and_get_payload', null, $this->mutation_name, $this->config['mutateAndGetPayload'], $input, $context, $info );
Related
WPMutationType::get_resolver()inplugins/wp-graphql/src/Type/WPMutationType.php:238