apollographql / apollo-link

:link: Interface for fetching and modifying control flow of GraphQL requests
https://www.apollographql.com/docs/link/
MIT License
1.44k stars 344 forks source link

Update link-error docs to reference `response.errors = undefined` #1240

Closed dangreenisrael closed 4 years ago

dangreenisrael commented 4 years ago

The docs incorrectly show that response.error can be null. However in the graphql-js package that defines ExecutiionResult in is is either an array of GraphQLError or undefined. Null is not a valid option.

https://github.com/graphql/graphql-js/blob/master/src/execution/execute.d.ts#L52

Issue reference: https://github.com/apollographql/apollo-link/issues/1168

TODO:

apollo-cla commented 4 years ago

@dangreenisrael: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

dangreenisrael commented 4 years ago

I didn't update the changelog as its a docs update, but I'd be happy to do it if you like 🙂

codecov-io commented 4 years ago

Codecov Report

Merging #1240 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1240   +/-   ##
======================================
  Coverage    95.6%   95.6%           
======================================
  Files          22      22           
  Lines        1116    1116           
  Branches      174     174           
======================================
  Hits         1067    1067           
  Misses         44      44           
  Partials        5       5

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f3dcc8b...a2b2265. Read the comment docs.