Functions

The functions documented below are provided by WPGraphQL to extend the Schema or interact with the GraphQL API.

    register_graphql_admin_notice

    Add an admin notice that will display on the plugins page, network plugins page, WPGraphQL Settings page and WPGraphQL IDE page.

    register_graphql_union_type

    Given a Type Name and a `$config` array, this adds an UnionType to the TypeRegistry

    graphql

    Given an array with a Query and optional Variables and Operation Name this executes a GraphQL request.

    register_graphql_mutation

    Given a Mutation Name and Config array, this adds a Mutation to the Schema

    deregister_graphql_field

    Given a Type Name and Field Name, this removes the field from the TypeRegistry

    register_graphql_scalar

    Given a config array for a custom Scalar, this registers a Scalar for use in the Schema

    register_graphql_connection

    Given a config array for a connection, this registers a connection by creating all appropriate fields and types for the connection.

    register_graphql_interfaces_to_types

    Given a type name and interface name, this applies the interface to the Type.

    register_graphql_interface_type

    Given a Type Name and a $config array, this adds an Interface Type to the TypeRegistry

    register_graphql_enum_type

    Given a Type Name and a $config array, this adds an EnumType to the TypeRegistry

    register_graphql_input_type

    Given a Type Name and a $config array, this adds an InputType to the TypeRegistry

    register_graphql_object_type

    Add an Object Type to the GraphQL Schema

    register_graphql_fields

    Add one or more fields to a Type in the GraphQL Schema

    register_graphql_field

    Add a field to a Type in the GraphQL Schema