graphql_pre_resolve_field

When this filter return anything other than the $nil it will be used as the resolved value and the execution of the actual resolved is skipped. This filter can be used to implement field level caches or for efficiently hiding data by returning null.

apply_filters( 'graphql_pre_resolve_field', mixed $nil, mixed $source, array $args, AppContext $context, ResolveInfo $info, string $type_name, string $field_key, FieldDefinition $field, mixed $field_resolver );

Params

  • $nil (mixed): Unique nil value
  • $source (mixed): The source passed down the Resolve Tree
  • $args (array): The args for the field
  • $context (AppContext): The AppContext passed down the ResolveTree
  • $info (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 (FieldDefinition): The Field Definition for the resolving field
  • $field_resolver (mixed): The default field resolver