register_graphql_scalar

Given a config array for a custom Scalar, this registers a Scalar for use in the Schema Per the GraphQL Spec, WPGraphQL provides several built-in scalar types. Boolean Float Integer ID String This function is used to define new Scalars to the Schema. Some common cases are Url, Email, Date, and others. Note: Future versions …

deregister_graphql_field

Given a Type Name and Field Name, this removes the field from the TypeRegistry Parameters $type_name (string): The Type Name $field_name (string): The Field Name to remove from the TypeRegistry Source File: access-functions.php Examples Below is an example of removing the commentCount field from the Post type. First the comment count can be seen on …

register_graphql_mutation

Given a Mutation Name and Config array, this adds a Mutation to the Schema Parameters $mutation_name (string): The name of the mutation $config (array): Configuration for the mutation $description (string): Description of the mutation type. $inputFields (array): The input fields for the mutation $type (string): The name of the Type in the Schema the field …

graphql

Given an array with a Query and optional Variables and Operation Name this executes a GraphQL request. Paramaters $operation (array): An associative array of key/value pairs for the operation to execute. $query (string): The Query string to execute. This can be a mutation as well. $variables (array): Array of variables to be used with the …