-
Hello! I am curious as to whether or not graphql-mesh can be configured to reference schemas directly - that is, as opposed to 'linking' to schemas in the .meshrc.yaml file, simply referring to schema files. To expand on this, the intent is to see if we can reduce our deployment needs from requiring a hook to update the introspectionCache.json and instead have the mesh update itself in real time when those schema files change. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Can you expand more on this? If I understand correctly you plan to update the data sources during runtime. In this case, how do you plan to handle breaking changes, for example? Having code in production that self updates itself without a manual pass, which is normally provided through code review, QA, and automated tests sounds a bit dangerous. |
Beta Was this translation helpful? Give feedback.
-
I would still advise on handling updated schema consumption through PRs. How much you can automate is down to the data source you consume, assuming your JSON schema is remote and you're not controlling it directly. Those are just some high-level ideas, it depends very much on how important it is to you to consume a fresh schema and your infrastructure setup. The key point is that you end up with a PR that implements the new version. This is what I would do.
If you don't have changes you could add a label to the PR, like "ready to merge". In this case, when all is good you don't have much (or maybe even none) manual work to do. Again, all of these are some answers that are coming to mind when thinking about how I would answer your questions. |
Beta Was this translation helpful? Give feedback.
I would still advise on handling updated schema consumption through PRs.
How much you can automate is down to the data source you consume, assuming your JSON schema is remote and you're not controlling it directly.
F.i. you could have a polling system as part of CI on your graphql service that checks the version number on your data source and eventually raise a PR to consume the new version of the schema.
If the data source is built internally within your organisation you could implement a push mechanism, so that every time a new version is deployed it will push a notification to your GraphQL service's CI pipelines and those will eventually raise the PR.
Those are just some high-level ide…