Skip to content

GraphQL 15.7.0 Breaks Apollo Server #3340

Closed
@dhay

Description

@dhay

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions