graphql_before_resolve_field

do_action( 'graphql_before_resolve_field', $source, $args, $context, $info, $field_resolver, $type_name, $field_key, $field );

Fire an action BEFORE the field resolves

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

Parameters

  • $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
  • $field_resolver (?callable): The Resolve function for the field
  • $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

Source

do_action( 'graphql_before_resolve_field', $source, $args, $context, $info, $field_resolver, $type_name, $field_key, $field );