Trouble switching to offlineExchange; runtime error: TypeError: Cannot read property 'length' of undefined #1453
-
I am attempting to switch to using the urql offlineExchange. Getting the following error:
I'm attempting to follow the Offline Support documentation (Offline Support. index.js:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Oh we probably made a mistake in the schema validation when we allowed partial schemas. For Offline Support to work correctly you have to enable Schema Awareness, meaning that you'll have to pass in a full schema. We have some instructions for that here: https://formidable.com/open-source/urql/docs/graphcache/schema-awareness/ Basically, we require this for offline support because in offline it'll become increasingly likely that Graphcache will have to deal with partial data. |
Beta Was this translation helpful? Give feedback.
Oh we probably made a mistake in the schema validation when we allowed partial schemas.
For Offline Support to work correctly you have to enable Schema Awareness, meaning that you'll have to pass in a full schema.
We have some instructions for that here: https://formidable.com/open-source/urql/docs/graphcache/schema-awareness/
Basically, we require this for offline support because in offline it'll become increasingly likely that Graphcache will have to deal with partial data.