Actions

WordPress provides an API called "actions"which allow functions to be executed at specific times during a request.

graphql_init

Fires after themes have been setup, allowing for both plugins and themes to register things before graphql_init

View Action

graphql_register_initial_types

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

View Action

graphql_user_object_mutation_update_additional_data

Run an action after the additional data has been updated. This is a great spot to hook into to update additional data related to users, such as setting relationships, updating additional usermeta, or sending emails to Kevin… whatever you need to do with the userObject

View Action

graphql_register_types_late

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

View Action

graphql_update_term

Fires an action when a term is updated via a GraphQL Mutation

View Action

graphql_process_http_request_response

Run an action after the HTTP Response is ready to be sent back. This might be a good place for tools to hook in to track metrics, such as how long the process took from graphql_process_http_request to here, etc.

View Action

graphql_process_http_request

This action can be hooked to to enable various debug tools, such as enableValidation from the GraphQL Config

View Action

graphql_server_config

Run an action when the server config is created. The config can be acted upon directly to override default values or implement new features, e.g., $config->setValidationRules()

View Action

graphql_return_response

Run an action after the response has been filtered, as the response is being returned. This is a good place for debug tools to hook in to log things, etc.

View Action

graphql_execute

Run an action. This is a good place for debug tools to hook in to log things, etc.

View Action

init_graphql_request

Action that executes when a GraphQL Request begins. This is a great place for plugins to hook in and modify things that should only occur in the context of a GraphQL Request. The base class hooks into this action to kick off the schema creation, types are not set up until this action has run.

View Action

graphql_post_object_mutation_set_object_terms

Fire an action before setting object terms during a GraphQL Post Object Mutation. One example use for this hook would be to create terms from the input that may not exist yet, so that they can be set as a relation below.

View Action

graphql_post_object_mutation_update_additional_data

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

View Action

graphql_media_item_mutation_update_additional_data

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.

View Action

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

View Action