Hey, nice to see this elegant solution for persisting data, but I'm facing some issue on React Native implementation.
My Apollo client configuration:
import AsyncStorage from '@react-native-community/async-storage';
const cache = new InStorageCache({
addPersistField: true,
shouldPersist: PersistLink.shouldPersist,
storage: AsyncStorage,
denormalize: async result => {
const data = await result;
return JSON.parse(data);
},
});
const link = ApolloLink.from([
new PersistLink(),
createHttpLink({ uri: API }),
]);
const client = new ApolloClient({
cache,
link,
});
Problem:
On the first query, I'm not using the directive @persist, then I'm getting the following message on the simulator:

And even if I add the directive, it still doesn't save the data.
Any idea about it?
Hey, nice to see this elegant solution for persisting data, but I'm facing some issue on React Native implementation.
My Apollo client configuration:
Problem:
On the first query, I'm not using the directive
@persist, then I'm getting the following message on the simulator:And even if I add the directive, it still doesn't save the data.
Any idea about it?