コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.
解決済み

Can we version graphql query

Avatar

Level 1

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

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

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. 

元の投稿で解決策を見る

1 返信

Avatar

正解者
Community Advisor

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.