Malpaux / apollo-offline

An offline toolkit for the Apollo client
https://www.npmjs.com/package/apollo-offline
BSD 3-Clause "New" or "Revised" License
188 stars 8 forks source link

Subscriptions #8

Open G3z opened 7 years ago

G3z commented 7 years ago

I get that it's not possible tu support subscriptions while offline but at the moment i receive an error if subscriptions are used. probably the provided networkInterface doen't have the subscribe && unsubscribe functions implemented schermata 2017-09-11 alle 11 57 20

PaulBrachmann commented 7 years ago

@G3z, can you please provide the code you are using to set up your Apollo client? I suspect you are applying GraphQL subscriptions to the network interface before you wrap it using Apollo-Offline.

As of now, Apollo-Offline does not natively support GraphQL subscriptions. This is why you currently have to apply subscriptions to the Apollo-Offline-wrapped network interface (so after - not before - you wrap it).

I plan on adding native support and proper offline fallbacks for subscriptions in the near future. (But we're just not quite there yet.)

Until then, I hope to assist you in finding a suitable workaround.

StefanFabian commented 5 years ago

Any updates on this?