Functions
The functions documented below are provided by WPGraphQL to extend the schema or interact with the GraphQL API.
Registration
-
Determine when to register types.
-
Registers an admin notice to display on WPGraphQL plugin screens.
-
Given a config array for a connection, this registers a connection by creating all appropriate fields and types for the connection
-
register_graphql_connection_where_argAdds an input field to the Connection Where Args between the provided ‘From’ Type Name and ‘To’ Type Name.
-
register_graphql_connection_where_argsAdds several input fields to the Connection Where Args between the provided ‘From’ Type Name and ‘To’ Type Name.
-
Adds a field to the Connection Edge between the provided ‘From’ Type Name and ‘To’ Type Name.
-
Adds several fields to the Connection Edge between the provided ‘From’ Type Name and ‘To’ Type Name.
-
Given a Type Name and a $config array, this adds an EnumType to the TypeRegistry
-
Given a Type Name, Field Name, and a $config array, this adds a Field to a registered Type in the TypeRegistry
-
Given a Type Name and an array of field configs, this adds the fields to the registered type in the TypeRegistry
-
Given a Type Name and a $config array, this adds an InputType to the TypeRegistry
-
register_graphql_interface_typeGiven a Type Name and a $config array, this adds an Interface Type to the TypeRegistry
-
register_graphql_interfaces_to_typesGiven a type name and interface name, this applies the interface to the Type.
-
Given a Mutation Name and Config array, this adds a Mutation to the Schema
-
Given a Type Name and a $config array, this adds an ObjectType to the TypeRegistry
-
Given a config array for a custom Scalar, this registers a Scalar for use in the Schema
-
register_graphql_settings_fieldRegisters a GraphQL Settings Field
-
register_graphql_settings_fieldsRegisters a series of GraphQL Settings Fields
-
register_graphql_settings_sectionRegisters a GraphQL Settings Section
-
Given a Type Name and a $config array, this adds a Type to the TypeRegistry
-
Given a Type Name and a $config array, this adds an UnionType to the TypeRegistry
-
Renames a GraphQL field.
-
Renames a GraphQL Type in the Schema.
Deregistration
-
Given a Connection Name, this removes the connection from the Schema
-
Given a Type Name and Field Name, this removes the field from the TypeRegistry
-
Given a Mutation Name, this removes the mutation from the Schema
-
Given a Type Name, this removes the type from the entire schema
Requests and Endpoint
-
Previous access function for running GraphQL queries directly.
-
Provides a simple way to run a GraphQL query without posting a request to the endpoint.
-
Get the endpoint route for the WPGraphQL API
-
Return the full url for the GraphQL Endpoint.
-
Generate a WPGraphQL nonce for cookie-based authentication.
-
Whether a GraphQL HTTP request is in action or not.
-
Whether a GraphQL request is in action or not.
Formatting and Validation
-
Formats the name of a field so that it plays nice with GraphiQL
-
Formats a string for use as a GraphQL name.
-
Formats the name of a Type so that it plays nice with GraphiQL
-
Check if the name is valid for use in GraphQL
Settings and Admin
-
Get the admin notices registered for the WPGraphQL plugin screens
-
Get an option value from GraphQL settings
-
Given a message and an optional config array