graphql_model_field_capability

apply_filters( 'graphql_model_field_capability', $capability, $field_name, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );

Capability to check required for the field

  • Type: filter
  • Group: Model Layer
  • Since: 0.3.0
  • Source File: plugins/wp-graphql/src/Model/Model.php

Parameters

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

Source

apply_filters( 'graphql_model_field_capability', $capability, $field_name, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );