Skip to content

[Feature Request] Use the function parameter for each "WPGraphQL::get_allowed_post_types()" call. #1443

@kidunot89

Description

@kidunot89

WPGraphQL::get_allowed_post_types() function accepts array parameter to be a used to filter the custom post types returned by the get_post() function.
Currently, the function is called throughout the register custom post types to the schema at different point the GraphQL tree. However, I believe that these calls could be made more flexible by adding more post-type properties to be used as filters for these calls.
For example, take the call in the TypeRegistry class, if it was change like so.

$allowed_post_types = \WPGraphQL::get_allowed_post_types( [ 'skip_graphql_core_registration' => true ] );

This would allow for the picking and choosing of specific WPGraphQL features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: discussionRequires a discussion to proceedtype: featureNew functionality being added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions