Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Not working with apolo gateway > 0.20.0 #26

Open
orefalo opened this issue Dec 23, 2020 · 3 comments
Open

Not working with apolo gateway > 0.20.0 #26

orefalo opened this issue Dec 23, 2020 · 3 comments

Comments

@orefalo
Copy link

orefalo commented Dec 23, 2020

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

@lgandecki
Copy link
Member

Sorry about the problem, also - thanks for the debugging :)
I will take a look in the morning.

@lgandecki
Copy link
Member

Interestingly enough, Apollo published a "tiny" "patch" release https://github.com/apollographql/federation/compare/@apollo/gateway@0.20.0...@apollo/gateway@0.20.1
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):

image

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 federation-testing-tool@3.1.0-alpha and let me know if it worked, I'd appreciate that!

@orefalo
Copy link
Author

orefalo commented Dec 25, 2020

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants