graphql_allowed_hosts

apply_filters( 'graphql_allowed_hosts', $default_allowed_hosts );

Filters hostnames treated as belonging to this WordPress install when resolving node URIs. By default includes the hosts from site_url() and home_url(). Extensions may append hosts (for example language-specific domains mapped to the same site).

  • Type: filter
  • Group: Request Lifecycle
  • Since: 2.12.0
  • Source File: plugins/wp-graphql/src/Data/NodeResolver.php

Parameters

  • $allowed_hosts (string[]): Hostnames permitted when comparing the parsed URI host.

Source

apply_filters( 'graphql_allowed_hosts', $default_allowed_hosts );