Skip to content

Filter API inconsistencies  #1588

@smthomas

Description

@smthomas

In the graphql_map_input_fields_to_wp_query filter, the $post_type is the last parameter. This is inconsistent with the other graphql_map_input_fields_* filters. For example in graphql_map_input_fields_to_get_terms the $taxonomy parameter is the third parameter (while the $context & $info parameters are the last two in all of the graphql_map_input_fields_* filters). For consistency sake, it may make sense to update this filter.

wp_query filter:

$query_args = apply_filters( 'graphql_map_input_fields_to_wp_query', $query_args, $where_args, $this->source, $this->args, $this->context, $this->info, $this->post_type );

get_terms filter:

$query_args = apply_filters( 'graphql_map_input_fields_to_get_terms', $query_args, $where_args, $this->taxonomy, $this->source, $this->args, $this->context, $this->info );

Metadata

Metadata

Assignees

No one assigned

    Labels

    compat: breaking changeThis is a breaking change to existing functionalityeffort: lowAround a day or lessgood first issueIssue that doesn't require previous experience with the codebaseimpact: lowFixes a minor issue for some people, slight DX improvementstatus: actionableReady for work to begintype: enhancementImprovements to existing functionality

    Type

    No type

    Projects

    Status

    🛑 On Hold

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions