graphql_map_input_fields_to_wp_query

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

Filter the input fields This allows plugins/themes to hook in and alter what $args should be allowed to be passed from a GraphQL Query to the WP_Query

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

Parameters

  • $query_args (array<string,mixed>): The mapped query arguments
  • $args (array<string,mixed>): Query “where” args
  • $source (mixed): The query results for a query calling this
  • $all_args (array<string,mixed>): All of the arguments for the query (not just the “where” args)
  • $context (\WPGraphQL\AppContext): The AppContext object
  • $info (\GraphQL\Type\Definition\ResolveInfo): The ResolveInfo object
  • $post_type (mixed|string|string[]): The post type for the query

Source

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