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

    graphql_get_type_registry

    Fire an action when the Type Register is returned

    graphql_get_schema

    Fire an action when the Schema is returned

    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

    graphql_get_debug_log

    Fires when the debug logs are retrieved

    graphql_wp_union_type

    Run an action when the WPObjectType is instantiating

    graphql_wp_object_type

    Run an action when the WPObjectType is instantiating

    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

    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

    init_graphql_type_registry

    Fires an action as the Type registry is being initiated

    graphql_update_term

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

    graphql_settings_form_bottom

    Allow additions to the bottom of the GraphQL settings form

    graphql_settings_form_top

    Allow additions to the top of the GraphQL settings form

    graphql_init_settings

    Action that fires when settings are being initialized

    graphql_register_settings

    Action to hook into to register settings

    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.

    graphql_process_http_request

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

    graphql_response_set_headers

    Fires an action when the headers are set

    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()

    do_graphql_request

    Run an action for reach request

    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.

    graphql_execute

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

    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.

    graphql_insert_post_object

    Fires after a single term is created or updated via a GraphQL mutation

    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.

    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.

    graphql_after_return_field_from_model

    Hook that fires after the data is returned for the field

    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.

    graphql_after_resolve_field

    Fire an action AFTER the field resolves

    graphql_before_resolve_field

    Fire an action BEFORE the field resolves

    graphql_comment_object_mutation_update_additional_data

    Fires an action when comment meta is updated

    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