You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In complex API ecosystems, different versions of operations are often required to support backward compatibility and evolution. This feature request aims to support operation versioning in GraphQL Mesh.
Currently, GraphQL Mesh merges all versions of an operation into a single query, which can result in conflicts and loss of version-specific details. By enabling operation versioning, each version of an operation will be exposed as a distinct query in the generated supergraph. This allows clients to explicitly request specific API versions, ensuring compatibility and leveraging new features without breaking existing functionality.
The supergraph.graphql output by Mesh will now have two queries: getSupplierById_v1 and getSupplierById_v2 which will respectively return the distinct objects Supplier_v1 and Supplier_v2.
The text was updated successfully, but these errors were encountered:
GraphQL Mesh will automatically try to merge types and fields. In order to prevent conflicts, transforms can help in my opinion; https://the-guild.dev/graphql/mesh/v1/transforms/prefix
But let me know if I miss something with your case.
Context
In complex API ecosystems, different versions of operations are often required to support backward compatibility and evolution. This feature request aims to support operation versioning in GraphQL Mesh.
Currently, GraphQL Mesh merges all versions of an operation into a single query, which can result in conflicts and loss of version-specific details. By enabling operation versioning, each version of an operation will be exposed as a distinct query in the generated supergraph. This allows clients to explicitly request specific API versions, ensuring compatibility and leveraging new features without breaking existing functionality.
Motivational Example
Given the following swaggers:
suppliers_v1.json
;suppliers_v2.json
;And the following
mesh.config.ts
file;The
supergraph.graphql
output by Mesh will only have one query: getSupplierById.We propose to add a
operationVersioning
parameter to thedefineConfig
, so that, by using it in themesh.config.ts
file like this;The
supergraph.graphql
output by Mesh will now have two queries: getSupplierById_v1 and getSupplierById_v2 which will respectively return the distinct objects Supplier_v1 and Supplier_v2.The text was updated successfully, but these errors were encountered: