Skip to content
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

GraphQL 15.7.0 Breaks Apollo Server #3340

Closed
dhay opened this issue Oct 27, 2021 · 2 comments
Closed

GraphQL 15.7.0 Breaks Apollo Server #3340

dhay opened this issue Oct 27, 2021 · 2 comments
Assignees

Comments

@dhay
Copy link

dhay commented Oct 27, 2021

We use Apollo Server, which depends on the graphql-js package. The latest update to version 15.7.0 causes Typescript compilation errors related to GraphQLError. Specifically the change related to originalError in this commit: d8ca570

- readonly originalError: Maybe<Error>;
+ readonly originalError: Error | undefined;

Previously Maybe was defined as null | undefined | T. Changing this to only Error | undefined causes errors like the following:

node_modules/apollo-server-errors/dist/index.d.ts(10,5): error TS2416: Property 'originalError' in type 'ApolloError' is not assignable to the same property in base type 'GraphQLError'.
  Type 'Error | null | undefined' is not assignable to type 'Error | undefined'.
    Type 'null' is not assignable to type 'Error | undefined'.

This is true when using both Apollo server version 2.x or 3.x

IvanGoncharov added a commit that referenced this issue Oct 27, 2021
Fix #3340
Partial revert of #3333
Were reverted due to conflict with Apollo Server, see
apollographql/apollo-server#5843
@IvanGoncharov
Copy link
Member

@dhay Thanks for reporting.
Fixed in https://github.com/graphql/graphql-js/releases/tag/v15.7.1

@charles-hill-work
Copy link

@IvanGoncharov Will this fix be ported to 16.x?

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

No branches or pull requests

3 participants