graphql_return_response

Run an action after the response has been filtered, as the response is being returned. This is a good place for debug tools to hook in to log things, etc.

do_action( 'graphql_return_response', array $filtered_response, array $response, WPGraphQL\WPSchema $schema, string $operation, string $query, array $variables, Request $request );

Params

  • $filtered_response (array): The filtered response for the GraphQL request
  • $response (array): The response for your GraphQL request
  • $schema (WPGraphQL\WPSchema): The schema object for the root request
  • $operation (string): The name of the operation
  • $query (string): The query that GraphQL executed
  • $variables (array|null): Variables passed to your GraphQL query
  • $request (Request): Instance of the Request object

Source

File: wp-graphql/src/Request.php