graphql_object_fields

Filter all object fields, passing the $typename as a param. This is useful when several different types need to be easily filtered at once. . .for example, if ALL types with a field of a certain name needed to be adjusted, or something to that tune.

apply_filters( 'graphql_object_fields', array $fields, string $type_name, WPObjectType $object_type, TypeRegistry $type_registry );

Params

  • $fields (array): The array of fields for the object config
  • $type_name (string): The name of the object type
  • $object_type (WPObjectType): The WPObjectType Class
  • $type_registry (TypeRegistry): The Type Registry