Filter the visibility name to be returned

apply_filters( 'graphql_object_visibility', string $visibility, string $model_name, mixed $data, int $owner, WP_User $current_user );


  • $visibility (string|null): The visibility that has currently been set for the data at this point
  • $model_name (string): Name of the model the filter is currently being executed in
  • $data (mixed): The un-modeled incoming 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