apollo-link-state

React-Native + Apollo-Link-State + AWS Appsync : Defaults are not stored in cache

元气小坏坏 提交于 2019-12-25 00:16:05
问题 I'm struggling with this for days. I've successfully configure Apollo-Link-State with AppSync a month ago and start adding defaults and resolvers like this : const cache = new InMemoryCache() //create the cache to be shared by appsync and apollo-link-state const appSyncAtrributes = { //... //setup appSync } const stateLink = createLinkWithCache(() => withClientState({ cache, resolvers: { Mutation: { updateCurrentUser: (_, { username, thumbnailUrl }, { cache }) => { // ... // working mutation

apollo-link-state defaults derived from query data?

可紊 提交于 2019-12-11 12:59:23
问题 Note: This is a followup question to my previous question about Apollo GraphQl Storing derived data I'm using apollo-link-state to store data that's derived from query data. In this example the query data from the db includes some (x,y) points on a graph and the derived data is slope, moving average, acceleration etc. My React graphing components need different combinations of original and derived data. Some need only the original. I need derived data to be calculated only once and only when