kamilkisiela / apollo-angular

A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
https://apollo-angular.com
MIT License
1.5k stars 311 forks source link

Demonstrate usage of ApolloLink.from with onError #1973

Closed Gkleinereva closed 1 year ago

Gkleinereva commented 1 year ago

I couldn't figure out how to do this without consulting Stack Overflow (https://stackoverflow.com/questions/49420667/angular-apollo-error-handling). I figured it merited a quick doc update.

Checklist:

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 244b42f0c3464a42a337611c7dc04b0d0c087651

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

PowerKiKi commented 1 year ago

Thanks for the suggestion, however this behavior is not specific to Angular Apollo. It is coming straight from Apollo Client which has a much more complete documentation that we should not try to duplicate here.

See https://www.apollographql.com/docs/react/api/link/introduction/#additive-composition and https://www.apollographql.com/docs/react/api/link/apollo-link-error/