graphql_allowed_post_stati

apply_filters( 'graphql_allowed_post_stati', $allowed_statuses, $statuses, $post_type_objects, $this );

Filters the post statuses the current user is allowed to query in this connection. Allows extensions to adjust which statuses are queryable (for example to expose an additional custom status to specific users, or to further restrict access).

  • Type: filter
  • Group: Connections
  • Since: 2.17.0
  • Source File: plugins/wp-graphql/src/Data/Connection/PostObjectConnectionResolver.php

Parameters

  • $allowed_statuses (string[]): The statuses determined to be queryable by the current user.
  • $requested_statuses (string[]): The statuses requested via the connection stati where arg.
  • $post_type_objects (array<\WP_Post_Type|null>): The post type objects the connection resolves.
  • $resolver (\WPGraphQL\Data\Connection\PostObjectConnectionResolver): The connection resolver instance.

Source

apply_filters( 'graphql_allowed_post_stati', $allowed_statuses, $statuses, $post_type_objects, $this );