๐Ÿš€ Released Gato GraphQL v1.1 (with predefined Persisted Queries)

Leonardo Losoviz
By Leonardo Losoviz ยท

Version 1.1 of Gato GraphQL has been released! ๐ŸŽ‰

Explore all the new features in the release notes in GitHub. Below is the summary with the most important features.

Predefined Persisted Queries

Version 1.1 adds predefined Persisted Queries to tackle a number of common admin tasks, including:

  • Duplicate posts
  • Replace strings in posts
  • Replace and old domain with a new domain in posts
  • Insert a block in posts
  • Remove a block from posts
  • Translate posts
  • Import a post from another WordPress site
  • Export a post into another WordPress site
  • Many more
Predefined Persisted Queries
Predefined Persisted Queries

These Persisted Queries are all published as private, so they are not publicly exposed. These can be executed from within the wp-admin, by a logged-in user with the corresponding capability.

(An additional Persisted Query, to provide as webhook to InstaWP to process newsletter registrations, was added with status draft, so it's also not publicly exposed.)

Every Persisted Query contains the GraphQL query to execute for that task, documentation on what inputs must be provided, and a notice of which extensions are required (if any):

Persisted Query in the Editor
Persisted Query in the Editor

In addition, if the Persisted Query requires some specific configuration (such as "nested mutations"), a corresponding Schema Configuration is also created and defined accordingly.

You can execute the Persisted Query either:

  • Straight from the GraphiQL client, passing the inputs as variables
  • Invoking the Persisted Query's URL in the browser, passing the inputs as URL params

Explore the list of all the predefined Persisted Queries in the release notes.

How are predefined Persisted Queries useful?

The addition of predefined Persisted Queries makes it easier for admins to execute and automate tasks on their sites.

Do you need to translate a post into any language? Execute the Persisted Query "Translate post", passing the language and post ID as URL params.

Do you need to synchronize content across sites? Execute Persisted Query "Export a post into another WordPress site", passing the post slug to sync, and the destination site's endpoint URL, as params.

And so on. It's like executing WP-CLI commands, but using GraphQL queries instead, which are composed, stored and executed already within the wp-admin.

We plan to keep adding more predefined Persisted Queries in future releases.


Want more posts & tutorials?

Receive timely updates as we keep improving Gato GraphQL.

No spam. You can unsubscribe at any time.