Not working with apolo gateway > 0.20.0
Hi,
I was wondering if you could provide a tip, to make this project work with the latest version of federation.
I traced the error, to the following:
"devDependencies": {
"@apollo/federation": "0.20.7",
"@apollo/gateway": "0.20.0",
...
}
The version above is the latest combination I could get working.
if you update to "@apollo/gateway": "0.20.1", or any version above, the unit tests fail.
any idea?
Thank you
Sorry about the problem, also - thanks for the debugging :) I will take a look in the morning.
Interestingly enough, Apollo published a "tiny" "patch" release https://github.com/apollographql/federation/compare/@apollo/[email protected]...@apollo/[email protected] that contained work of 15 contributors, 505 changed files with 115,022 additions and 2,003 deletions. It incidentally also changed a lot of publicly exposed API. I was able to massage the code in this package into the new API (using try/catch so it worked for both older and newer versions...), but then hit a wall with some cryptic wasm errors (apparently apollo started using that, and it's probably smart, but I have no idea how to debug an error that looks like this):

I published an alpha version that should work, it explicitly relies on the gateway 0.20.0. My only worry is (and the reason why I did not just fixed version of apollo dependencies from the beginning) possible mismatch of different graphql versions. I preferred to have all the apollo/graphql stuff being peerDependency, but with such an interesting backward-compatibility behavior from Apollo that's probably not the way to go anymore :)
If you'd be so kind to try this version [email protected] and let me know if it worked, I'd appreciate that!
Thank you so much for the prompt fix, it works for my "simple" use cases.
Will report any issue I can find.
On your comments, I didn't get to that deepness of debugging, but definitely interesting - from what I can see happening in the apollo repo - the gateway will soon be in rust.
If I may - I would add the following to the readme.
The challenge
Testing federated GraphQL models is challenging:
By definition, federated schemas are composed from remote graphql instances
Setting up and shutting down all these instances as part of a CI/CD pipeline can proove complex and unreliable.
Furthermore, data must be easy to mock in order to bring consistent testing
What does this project bring
The ability to start the gateway and its sub-domains as part of a single process
The ability to easily mock graphql responses