Homepage
Link to WPGraphQL on Github
Link to WPGraphQL on WordPress.org

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.

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