Skip to main content
Answer

How to get the latest graphql url of a minor data model ?

  • June 10, 2025
  • 1 reply
  • 35 views

Marwen TALEB
MVP

Hello,

 

We envision to implement a versioning based on minor and major version of our data models. 

So a data model version will be presented with two digits: <Major>.<Minor>

<Major>: incremented when we do a breaking change that is not backward compatible with the previous one and we know that it will break our consumers queries. Exp: delete an attribute in a view in the data model

<Minor>: incremented when we do a change that is backward compatible and consumer queries will not break. Exp: add a new field. 

Is there a way to get a graphql url that maps always to the latest minor version of a given data model? 

This will avoid our data model consumers to redeploy their application every time we increment our minor version. 

 

Thank you!

Best answer by Arild Eide

Hi ​@Marwen TALEB 

No, here is no graphql path pointing to the latest minor version of your data model as the version is part of the path.

The /models/datamodels/byids will return all or a specific version of a given data model. So it is possible to client-side get hold of the most recently created version. A challenge you have probably already identified is when a new version is created that is not ready for consumption.

Another and more explicit approach would be to create a data model with a version string set to latest or similar and simply update this one as and alias for the version you want the client to consume at a given time.

 

Hope this helps.

 

Regards,

 

Arild Eide

1 reply

Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • Answer
  • June 11, 2025

Hi ​@Marwen TALEB 

No, here is no graphql path pointing to the latest minor version of your data model as the version is part of the path.

The /models/datamodels/byids will return all or a specific version of a given data model. So it is possible to client-side get hold of the most recently created version. A challenge you have probably already identified is when a new version is created that is not ready for consumption.

Another and more explicit approach would be to create a data model with a version string set to latest or similar and simply update this one as and alias for the version you want the client to consume at a given time.

 

Hope this helps.

 

Regards,

 

Arild Eide