Company
Date Published
Author
Alessandro Pagnin
Word count
1838
Language
English
Hacker News points
None

Summary

The Cosmo Router serves billions of requests daily and aims to avoid introducing breaking changes that could result in failed queries. A tool was built to export customer schemas and GraphQL operations into a private GitHub repo, run the router in "headless query planning mode" against exported queries, and check for plan changes or errors. The tool has three main parts: a router subcommand that generates query plans, a daily workflow that exports customer data, and a GitHub workflow that runs on every pull request and checks for plan changes. Query planning is complex due to the lack of a specification and the introduction of new features in GraphQL Federation, which can lead to complex query plans. The tool provides visibility into query plan changes and helps ensure that changes are intentional and do not introduce regressions. It also integrates with GitHub Actions to run automated checks on every pull request.