Expandir minha barra de realizações na Comunidade.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLUCIONADO

Can we version graphql query

Avatar

Level 1

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

1 Solução aceita

Avatar

Resposta correta de
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. 

Ver solução na publicação original

1 Resposta

Avatar

Resposta correta de
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.