graphql_resolve_field

apply_filters( 'graphql_resolve_field', $result, $source, $args, $context, $info, $type_name, $field_key, $field, $field_resolver );

Fire an action before the field resolves

  • Type: filter
  • Group: Debugging and Instrumentation
  • Since: 0.0.1
  • Source File: plugins/wp-graphql/src/Utils/InstrumentSchema.php

Parameters

  • $result (mixed): The result of the field resolution
  • $source (mixed): The source passed down the Resolve Tree
  • $args (array<string,mixed>): The args for the field
  • $context (\WPGraphQL\AppContext): The AppContext passed down the ResolveTree
  • $info (\GraphQL\Type\Definition\ResolveInfo): The ResolveInfo passed down the ResolveTree
  • $type_name (string): The name of the type the fields belong to
  • $field_key (string): The name of the field
  • $field (\GraphQL\Type\Definition\FieldDefinition): The Field Definition for the resolving field
  • $field_resolver (?callable): The default field resolver

Source

apply_filters( 'graphql_resolve_field', $result, $source, $args, $context, $info, $type_name, $field_key, $field, $field_resolver );