Automation
Automation
Automatically execute a GraphQL Persisted Query when some event happens on the site, via an "automator" user interface.
The automation trigger is any WordPress action hook, and the action is the execution of a GraphQL persisted query.
For instance, when creating a new post, automation rule Add comments block to new post checks if the core/comments
block is present and, if not, it adds it at the bottom of the post:
This extension also provides action hooks to be invoked from within WP-Cron:
gatographql__execute_query
gatographql__execute_persisted_query
You can also add a hook in your application's PHP code, to react to the resolution of a GraphQL query, via the following action hooks:
gatographql__executed_query:{$operationName}
gatographql__executed_query