Schema versioning and diffing breaking changes #1495
-
Hi guys, I would like to start a discussion around the topic of breaking changes and schema versioning in GraphQL Mesh. I have also thought a little bit about potential solutions and I am going to propose one. Problem
Question?I know this topic around versioning and maintaining old clients is non-trivial but I was thinking if there is already something that could improve this situation on the GraphQL Mesh? Proposal idea:My idea here would be to have some sort of schema locking with another module. For example, on server start-up the module could compare the newly created schema with the locked schema from before and report differences or even yield an error and stop any further actions. I hope this was the right place for this problem. What are your thoughts on this? fyi @Kiesen |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @angelsvirkov ! The first thing here is - we don't have any way to tell that the upstream schemas has changed - we have some thoughts on adding restart policies for the mesh, but currently it's just not there yet. Regarding the GraphQL schema changes: your suggestion is really interesting, but we can't really tell when the change has happened since it happens in runtime. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick and thorough answer. I have a follow-up question on this topic if you don't mind. Apart from detecting breaking changes, there is also the problem of maintaining older schema versions, which is even a bigger problem. But would you say that it could be possible in GraphQL Mesh to maintain older schemas and new schemas together? Let's say with some sort of an adaptability module which does transform older schemas into the new one and it makes the compatible in a way. The reason I am asking is because with GraphQL Mesh we get a very high level of abstraction and generality but I feel like we might lose some points like version management which require some more specific work. So if GraphQL Mesh exposes some functionality for schema version management then it would really strike a golden balance between abstraction and specificity. Is the latter what you meant by something you would like to tackle in GraphQL Mesh? P.S. I am not sure if such a version management mechanism could be implemented as part of the mesh or as you already mentioned in separate setup on top. |
Beta Was this translation helpful? Give feedback.
-
For anyone who is looking for an update on this, here is what I believe are good solutions available at the time of writing |
Beta Was this translation helpful? Give feedback.
For anyone who is looking for an update on this, here is what I believe are good solutions available at the time of writing