graphql_restricted_data_cap
apply_filters( 'graphql_restricted_data_cap', $this->restricted_cap, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );
Filter for the capability to check against for restricted data
- Type: filter
- Group: Model Layer
- Since: 0.3.0
- Source File:
plugins/wp-graphql/src/Model/Model.php
Parameters
$restricted_cap(string): The capability to check against$model_name(string): Name of the model the filter is currently being executed in$data(TData): The un-modeled incoming data$visibility(string|null): The visibility that has currently been set for the data at this point$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_restricted_data_cap', $this->restricted_cap, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );
Related
Model::get_visibility()inplugins/wp-graphql/src/Model/Model.php:217