Link to WPGraphQL on Github
Link to WPGraphQL on WordPress.org


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.


  • $media_item_id (int): The ID of the mediaItem being mutated
  • $input (array): 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 (AppContext): The AppContext that is passed down the resolve tree
  • $info (ResolveInfo): The ResolveInfo that is passed down the resolve tree


File: wp-graphql/src/Data/MediaItemMutation.php