graphql_term_object_mutation_update_additional_data

do_action( 'graphql_term_object_mutation_update_additional_data', $term_id, $input, $taxonomy, $mutation_name, $context, $info );

Fires after a term has been created or updated via a GraphQL mutation. This is a great spot to hook into to update additional data related to terms, such as termmeta or relationships, using the mutation input.

  • Type: action
  • Group: Model Layer
  • Since: 2.27.0
  • Source File: plugins/wp-graphql/src/Data/TermObjectMutation.php

Parameters

  • $term_id (int): The ID of the term being mutated
  • $input (array<string,mixed>): The input for the mutation
  • $taxonomy (\WP_Taxonomy): The taxonomy of the term being mutated
  • $mutation_name (string): The name of the mutation (ex: createCategory, updateTag)
  • $context (\WPGraphQL\AppContext): The AppContext passed down to all resolvers
  • $info (\GraphQL\Type\Definition\ResolveInfo): The ResolveInfo passed down to all resolvers

Source

do_action( 'graphql_term_object_mutation_update_additional_data', $term_id, $input, $taxonomy, $mutation_name, $context, $info );