-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error when reading typedef from file in V2.6.6 #2921
Comments
This comment has been minimized.
This comment has been minimized.
Maybe is this problem => #2924 |
Specifically, make sure to test all possibilities which might come in here.
See also #2753 |
Apollo released a breaking change in a semver-minor which causes it to stop understanding the SDL (string) GraphQL typeDefs we were passing it. This fix ensures we're converting to an AST to avoid the error being thrown. See apollographql/apollo-server#2921 Fixes #1340
Thank you @mrsunboss for tracking down the issue and opening the appropriate PR to fix the problem. This subtle but positive triaging, linking and fixing is well received and great for the project, so thank you! This was introduced by an unguarded property access in #2762. TypeScript offers us a lot of protections, and seemed to indicate that there was nothing to worry about, but TypeScript is still is no substitute for defensive coding. Tests help protect all involved here, both on our side, and on the side of our consumers — who should, as a best practice — have integration tests in place to make sure their production expectations and needs are met. On top of @mrsunboss's #2924, I've added a regression test for this in 32deb9f, a further defense for another explored possibility in 490c93a and updated the I'll release 2.6.7 soon with the fix. |
Apollo released a breaking change in a semver-minor which causes it to stop understanding the SDL (string) GraphQL typeDefs we were passing it. This fix ensures we're converting to an AST to avoid the error being thrown. See apollographql/apollo-server#2921 Fixes #1340
Apollo released a breaking change in a semver-minor which causes it to stop understanding the SDL (string) GraphQL typeDefs we were passing it. This fix ensures we're converting to an AST to avoid the error being thrown. See apollographql/apollo-server#2921 Fixes #1340
Package Name & Version
The issue is present in
apollo-server-express
, the latest version (2.6.6).Latest version where the problem did not occur
My previous version was 2.6.3
Expected Behavior
gql schema can load from file
Actual Behavior
The following fatal error occurs
Repo demonstrating the problem
https://github.com/ais-one/apollo-express-test
It's a simple example showing how to replicate the problem
The text was updated successfully, but these errors were encountered: