register_graphql_interfaces_to_types

register_graphql_interfaces_to_types( $interface_names, $type_names ): void;

Given a type name and interface name, this applies the interface to the Type. Should be used at the graphql_register_types hook.

  • Since: 0.9.0
  • Source File: plugins/wp-graphql/access-functions.php

Parameters

  • $interface_names (string|string[]): Array of one or more names of the GraphQL Interfaces to apply to the GraphQL Types
  • $type_names (string|string[]): Array of one or more names of the GraphQL Types to apply the interfaces to.

Source

function register_graphql_interfaces_to_types( $interface_names, $type_names ): void {