graphql_resolve_uri
apply_filters( 'graphql_resolve_uri', null, $uri, $queried_object, $query, $this->context, $this->wp, $extra_query_vars );
When this filter return anything other than null, it will be used as a resolved node and the execution will be skipped. This is to be used in extensions to resolve their own nodes which might not use WordPress permalink structure. It differs from ‘graphql_pre_resolve_uri’ in that it has been called after the query has been run using the query vars.
- Type: filter
- Group: Request Lifecycle
- Since: 0.0.5
- Source File:
plugins/wp-graphql/src/Data/NodeResolver.php
Parameters
$node(mixed|null): The node, defaults to nothing.$uri(?string): The uri being searched.$queried_object(\WP_Term|\WP_Post_Type|\WP_Post|\WP_User|null): The queried object, if WP_Query returns one.$query(\WP_Query): The query object.$content(\WPGraphQL\AppContext): The app context.$wp(\WP): WP object.$extra_query_vars(array<string,mixed>|string): Any extra query vars to consider.
Source
apply_filters( 'graphql_resolve_uri', null, $uri, $queried_object, $query, $this->context, $this->wp, $extra_query_vars );
Related
NodeResolver::resolve_uri()inplugins/wp-graphql/src/Data/NodeResolver.php:250