question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add persistor options in ApolloOfflineClient constructor

See original GitHub issue

Feature Request

Is your feature request related to a problem? Please describe. I’m using v0.11.0. It is not possible to specify persistor options in the ApolloOfflineClient constructor. When using with react native, it is necessary to use a ‘wrapper’ to force serialization of data saved in AsyncStorage since the default options passed to the persistor has the serialize option value as false which causes a problem when persisting the cache data.

Describe the solution you’d like Instead of having to define a ‘wrapper’ which is just a workaround, not a solution. Allow to define optional persistor options through the ApolloOfflineClient constructor. This will even solve #273

Describe alternatives you’ve considered None.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
darahayescommented, Dec 5, 2019

@JaEdmuva we’ll definitely work on allowing you to pass down the persistor options through the constructor. In the meantime did you try following the steps for passing in a custom storage mechanism in our react native document? This storage mechanism might help you get past the error you are seeing. See https://offix.dev/docs/react-native#integration

0reactions
darahayescommented, Jan 14, 2020

I’m going to close this issue now, but please do not hesitate to reach out again with any more questions or feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

class ApolloClient - Apollo GraphQL Docs
It backs all available view-layer integrations (React, iOS, and so on). The ApolloClient constructor. constructor(options). (src/core/ApolloClient.ts, line 127).
Read more >
redux-persist - npm
Basic usage involves adding persistReducer and persistStore to your setup. IMPORTANT Every app needs to decide how many levels of state they ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found