Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!

Can we version graphql query

Avatar

Level 1

Is there any way we can version the graphql persisted queries.

1 Reply

Avatar

Level 7

Persisted queries url gets cached. So versioning of query is creating new url, not available in cache. Currently in our project, we duplicate the queries to v2 like this 

sarav_prakash_0-1737400770373.png

This way old clients will continue using v1 version and new clients can switch to v2. 

 

Remember, non-breaking changes, like adding new fields, dont require versioning. Since clients would simply ignore new field. But breaking changes, like changing modal, removing fields, changing filters etc, will break existing clients and has to be versioned.