Extension

Persisted Queries

Use GraphQL queries to create pre-defined endpoints as in REST, obtaining the benefits from both APIs.

Gato GraphQL logo
Target Image

Click to watch tutorial video - 08:19

In a REST API, we create multiple endpoints, each returning a pre-defined set of data. In a GraphQL API, in contrast, we provide any query to a single endpoint, which returns exactly the requested data.

Persisted queries are normal GraphQL queries, however they are stored in the server and accessed under their own URL, thus emulating a REST endpoint. They provide the advantages from these two APIs, while avoiding their disadvantages:

AdvantagesDisadvantages
✅ Accessed via GET or POST❌ Accessed only via POST
✅ Can be cached on the server or CDN❌ Needs to provide an extra layer in client-side just for caching
✅ It's secure: only intended data is exposed❌ Data is exposed to anyone, including malicious actors
✅ No under/over fetching of data, all data is retrieved in a single request❌ It can be slow, since the application may need several requests to retrieve all the data
✅ It enables rapid iteration of the project❌ It's tedious to create all the endpoints
✅ It can be self-documented❌ Producing documentation is mandatory
✅ It provides clients to create and publish the query❌ Publishing endpoints is done via code
Persisted query editor
Persisted query editor

Once the persisted query is published, we can execute it via its permalink.

The persisted query can be executed via the GraphiQL client, or also directly in the browser (since it is accessed via GET), and we will obtain the requested data, in JSON format:

Executing a persisted in the browser
Executing a persisted in the browser

The persisted queries can be managed via categories and hierarchies.

Persisted queries page
Persisted queries page

Get your extension

Purchase the Persisted Queries extension, or a bundle with all the extensions

60% Off!
Personal
$24.99
Persisted Queries
License for 5 domains
Purchase ->
  • 5 domains
  • Support
  • Product updates
Organization
$49.99
Persisted Queries
License for 25 domains
Purchase ->
  • 25 domains
  • Support
  • Product updates
Professional
$74.99
Persisted Queries
License for 100 domains
Purchase ->
  • 100 domains
  • Support
  • Product updates
Agency
$99.99
Persisted Queries
License for 500 domains
Purchase ->
  • 500 domains
  • Support
  • Product updates

The license is for 1 year (renewable every year). Prices are in USD.

30-day money back guarantee

Purchase any extensions with the confidence that you can request a refund

Features illustration
Money back guarantee
Testimonial image

We loved this plugin and are annoyed that it’s better than a similar thing we are working on 😂 (we have a network of news sites and Gato GraphQL will save us a lot of time!)

Joebe W. - Developer
Discover the power

Try demo now!

Play with Gato GraphQL + all extensions in your own sandbox site, for free