PR based workflow for Federation
Let us go over how to use the subgraph check command in CI to prevent breaking changes in production. Use our GitHub app to seamlessly approve breaking changes in the Cosmo Studio.
Usage in CI
You can run wgc subgraph check
on pull requests to validate changes to your subgraphs. The CLI is aware of the environment in which it runs. Here is an example using GitHub actions:
GitHub App Integration
By installing the Cosmo GitHub App onto your repositories, we can apply status checks to commits in your pull request.
The check fails if composition errors or breaking changes are detected. In the case of only breaking changes, you can override the status of the check in the Studio.
Please ensure your branch is protected; otherwise, a developer can still merge a PR with a failing check.
Video Tutorial
Below is a complete video demo. (Assuming you have CI setup similar to the yaml provided above).
Last updated