register_graphql_mutation

register_graphql_mutation( string $mutation_name, array $config ): void;

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

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

Parameters

  • $mutation_name (string): The name of the Mutation to register
  • $config (array<string,mixed>): The config for the mutation

Recipes

Source

function register_graphql_mutation( string $mutation_name, array $config ): void {