is_graphql_http_request
is_graphql_http_request(): bool;
Whether a GraphQL HTTP request is in action or not. This is determined by checking if the request is occurring on the route defined for the GraphQL endpoint. This conditional should only be used for features that apply to HTTP requests. If you are going to apply filters to underlying WordPress core functionality that should affect all GraphQL requests, you should use “is_graphql_request” but if you need to apply filters only if the GraphQL request is an HTTP request, use this conditional. Default false.
- Since: 0.4.1
- Source File:
plugins/wp-graphql/access-functions.php
Return
bool: True when the current request is an HTTP request against the GraphQL endpoint, false otherwise.
Recipes
Source
function is_graphql_http_request(): bool {