Filter the array of fields for the Model before the object is hydrated with it
apply_filters( 'graphql_return_modeled_data', array $fields, string $model_name, string $visibility, int $owner, WP_User $current_user );
Params
- $fields (array): The array of fields for the model
- $model_name (array): Name of the model the filter is currently being executed in
- $visibility (string): The visibility setting for this piece of 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