Capability to check required for the field

apply_filters( 'graphql_model_field_capability', string $capability, string $key, string $
model_name, mixed $data, string $visibility, null|int $owner, WP_User $current_user );


  • $capability (string): The capability to check against to return the field
  • $key (string): The name of the field on the type
  • $model_name (string): Name of the model the filter is currently being executed in
  • $data (mixed): The un-modeled incoming data
  • $owner (null|int): The user ID for the owner of this piece of data
  • $current_user (WP_User): The current user for the session