Archives: Actions

  • graphql_comment_object_mutation_update_additional_data

    Fires an action when comment meta is updated

    do_action( 'graphql_comment_object_mutation_update_additional_data', int $comment_id, array $input, string $mutation_name, AppContext $context, ResolveInfo $info, string $intended_comment_status, string $default_comment_status );

    Params

    • $comment_id (int): The ID of the comment
    • $input (array): The input for the mutation
    • $mutation_name (string): The name of the mutation (ex: create, update, delete)
    • $context (AppContext): The AppContext passed down to all resolvers
    • $info (ResolveInfo): The ResolveInfo passed down to all resolvers
    • $intended_comment_status (string): The intended comment status according to the mutation input
    • $default_comment_status (string): The default status the comment should use if an intended status wasn’t set

    Source

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

  • graphql_register_types

    Fire an action as the type registry is initialized. This executes before the graphql_register_types action to allow for earlier hooking

    do_action( 'graphql_register_types', TypeRegistry $type_registry );

    Params

    • $type_registry (WPGraphQL\Registry\TypeRegistry): The registry of Types used in the GraphQL Schema

    Source

    File: wp-graphql/src/Registry/TypeRegistry.php