Filter the default post status to use when the post is initially created. Pass through a filter to allow other plugins to override the default (for example, Edit Flow, which provides control over customizing statuses or various E-commerce plugins that make heavy use of custom statuses)

apply_filters( 'graphql_post_object_create_default_post_status', string $default_status, WP_Post_Type $post_type_object, string $mutation_name );


  • $default_status (string): The default status to be used when the post is initially inserted
  • $post_type_object (WP_Post_Type): The Post Type that is being inserted
  • $mutation_name (string): The name of the mutation currently in progress