graphql_media_item_mutation_update_additional_data

do_action( 'graphql_media_item_mutation_update_additional_data', $media_item_id, $input, $post_type_object, $mutation_name, $context, $info );

Run an action after the additional data has been updated. This is a great spot to hook into to update additional data related to mediaItems, such as updating additional postmeta, or sending emails to Kevin. . .whatever you need to do with the mediaItem.

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

Parameters

  • $media_item_id (int): The ID of the mediaItem being mutated
  • $input (array<string,mixed>): The input for the mutation
  • $post_type_object (\WP_Post_Type): The Post Type Object for the type of post being mutated
  • $mutation_name (string): The name of the mutation (ex: create, update, delete)
  • $context (\WPGraphQL\AppContext): The AppContext that is passed down the resolve tree
  • $info (\GraphQL\Type\Definition\ResolveInfo): The ResolveInfo that is passed down the resolve tree

Source

do_action( 'graphql_media_item_mutation_update_additional_data', $media_item_id, $input, $post_type_object, $mutation_name, $context, $info );