apollographql/apollo-link

Ignoring errors does not work as in the docs when using Typescript

Opened this issue · 0 comments

Expected Behavior
According to https://www.apollographql.com/docs/react/data/error-handling/#ignoring-errors I should be able to modify `response.errors.

Actual Behavior

Type 'GraphQLError[] | null' is not assignable to type 'readonly GraphQLError[] | undefined'.
  Type 'null' is not assignable to type 'readonly GraphQLError[] | undefined'.

A simple reproduction
Try the code at https://www.apollographql.com/docs/link/links/error/#ignoring-errors with typescript

apollo-link-error@1.1.12