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
Hi, I experimmented a bit with apollo-client the last 2 days, and at the moment my stack of 'links' is:
import {RetryLink} from '@apollo/client/link/retry';
import ApolloLinkTimeout from 'apollo-link-timeout';
import {setContext} from '@apollo/client/link/context'; //I add header 'authorization': 'Bearer <JWTtoken>' with this
(the http link)
For query cache persistance I use: import {persistCache} from 'apollo-cache-persist';
=> So what I'm still missing is mutation persistance... I found some guides that use apollo-link-serialize to make sure that mutations are executed in the correct order, but I guess that is not needed If I use apollo-link-offline with 'sequential = true' ?
=> Since 'persistCache' handles only querries, it will not conflict with (AsyncStorage)persistance of apollo-link-offline?
=>Can I use retryOnServerError=false, and count on my RetryLink to handle the retrying, or will that not work and should I block mutation retrying in RetryLink and enable it in apollo-link-offline?
=> Is the correct place to include it in my link stack between 2 and 3 in the list above?
Best regards,
Wim
The text was updated successfully, but these errors were encountered:
Hi, I experimmented a bit with apollo-client the last 2 days, and at the moment my stack of 'links' is:
import {RetryLink} from '@apollo/client/link/retry';
import ApolloLinkTimeout from 'apollo-link-timeout';
import {setContext} from '@apollo/client/link/context'; //I add header 'authorization': 'Bearer <JWTtoken>' with this
For query cache persistance I use:
import {persistCache} from 'apollo-cache-persist';
=> So what I'm still missing is mutation persistance... I found some guides that use apollo-link-serialize to make sure that mutations are executed in the correct order, but I guess that is not needed If I use apollo-link-offline with 'sequential = true' ?
=> Since 'persistCache' handles only querries, it will not conflict with (AsyncStorage)persistance of apollo-link-offline?
=>Can I use retryOnServerError=false, and count on my RetryLink to handle the retrying, or will that not work and should I block mutation retrying in RetryLink and enable it in apollo-link-offline?
=> Is the correct place to include it in my link stack between 2 and 3 in the list above?
Best regards,
Wim
The text was updated successfully, but these errors were encountered: