-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript does not compile with gateway 0.x and Apollo Server v2 #2077
Comments
I think two small fixes will fix this:
|
glasser
added a commit
to apollographql/apollo-utils
that referenced
this issue
Aug 18, 2022
The consumer of this in `@apollo/gateway` is already doing some weird stuff with `Omit` around this field, so just explicitly allow the AS2 case. See apollographql/federation#2077
glasser
added a commit
to apollographql/apollo-utils
that referenced
this issue
Aug 18, 2022
The consumer of this in `@apollo/gateway` is already doing some weird stuff with `Omit` around this field, so just explicitly allow the AS2 case. See apollographql/federation#2077
glasser
added a commit
to apollographql/apollo-server
that referenced
this issue
Aug 18, 2022
glasser
added a commit
to apollographql/apollo-server
that referenced
this issue
Aug 18, 2022
glasser
added a commit
to apollographql/apollo-server
that referenced
this issue
Aug 18, 2022
Merged
This has now been resolved with the following versions: "@apollo/gateway": "0.52.1",
"apollo-server": "2.26.0" OR if you have a hard set dependency on "@apollo/gateway": "0.52.1",
"apollo-server": "2.26.0",
"apollo-server-types": "0.10.0" See the linked issues above for more details. |
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this issue
Oct 17, 2022
The consumer of this in `@apollo/gateway` is already doing some weird stuff with `Omit` around this field, so just explicitly allow the AS2 case. See apollographql/federation#2077
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this issue
Oct 17, 2022
The consumer of this in `@apollo/gateway` is already doing some weird stuff with `Omit` around this field, so just explicitly allow the AS2 case. See apollographql/federation#2077
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this issue
Oct 19, 2022
The consumer of this in `@apollo/gateway` is already doing some weird stuff with `Omit` around this field, so just explicitly allow the AS2 case. See apollographql/federation#2077
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use gateway version 0.29.0+ with Apollo Server v2 you will start relying on
apollo-server-types
both^0.9.0
OR^3.0.0
. See code[email protected]
-> AS2[email protected]
-> AS3federation/gateway-js/package.json
Line 41 in 7f5565a
Normally in dependencies, this would be ok, that we can use either version, however, the underlying dependency
apollo-server-env
also has a major version change. We updated theGraphQLRequest.headers
to instead defined inapollo-server-env
to be theHeaders
fromnode-fetch
. This was an unintentional "breaking change" that got populated. It appears to have no effect on the runtime of most users but what it does break is Typescript compile steps. So if users have atsc
step they can't even use these versions together.A potential fix is to instead have npm pull in the dependency of one or the other, we pull in both libs and define in the typed source code that the types themselves could be one or the other.
I believe we should also apply this fix to
main
if we want@apollo/gateway
v2 to still work with AS2.After this large refactoring, it will require more work to re-apply my initial PR: #2050
Initial PR to solve that now needs to be rewritten: #1964
Reproducible Stackblitz: https://stackblitz.com/edit/apolloserver-2-with-gateway-45?file=README.md
The text was updated successfully, but these errors were encountered: