Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about compatibility with other 'apollo-link's #15

Open
wimramuha opened this issue Aug 3, 2023 · 0 comments
Open

Question about compatibility with other 'apollo-link's #15

wimramuha opened this issue Aug 3, 2023 · 0 comments

Comments

@wimramuha
Copy link

wimramuha commented Aug 3, 2023

Hi, I experimmented a bit with apollo-client the last 2 days, and at the moment my stack of 'links' is:

  1. import {RetryLink} from '@apollo/client/link/retry';
  2. import ApolloLinkTimeout from 'apollo-link-timeout';
  3. import {setContext} from '@apollo/client/link/context'; //I add header 'authorization': 'Bearer <JWTtoken>' with this
  4. (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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant