You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
I've encountered the same issue when upgrading to beta.
Seems like it goes away if a HttpLink is included instead of the direct uri usage.
So maybe the lib is incorrectly expecting to always have subsequent items in the chain and a forward function present?
I am getting this error when a networkError happens with apollo-link-context, apollo-link-error, and apollo-link-http:
import{ApolloClient}from'apollo-client'import{HttpLink}from'apollo-link-http'import{setContext}from'apollo-link-context'import{onError}from'apollo-link-error'import{InMemoryCache}from'apollo-cache-inmemory'consthttpLink=newHttpLink({uri: // my api URI})constauthLink=setContext((_,{ headers })=>{// my authorization stuff})consterrorLink=onError(({ graphQLErrors, networkError })=>{// my error handling logic})constapolloClient=newApolloClient({link: authLink.concat(errorLink,httpLink),cache: newInMemoryCache()})
Expected Behavior
When using
onError()
from@apollo/link-error
we do not get an error upon GraphQL request.Actual Behavior
Deps:
Setup:
Upon interacting with a component which makes a GraphQL request, unfortunately this is all I get.
Breaking on exception, I get this in my bundle:
A simple reproduction
I tried to set up a Codesanbox, but it fails for AC 3.0 with a cryptic dependency problem:
https://codesandbox.io/s/apolloclient-3-local-state-management-before-reactive-variables-nr1kg
The text was updated successfully, but these errors were encountered: