apollo-link-state icon indicating copy to clipboard operation
apollo-link-state copied to clipboard

State link and subscriptions?

Open Torsten85 opened this issue 7 years ago • 9 comments

Hey, any chance this link will work with subscriptions? Current use case: I would like to make a subscription that will receive the currently discovered bluetooth device... something like:

subscription discoveredDevice {
  bluetoothDevice @client {
    name
  }
}

then I would publish the device via pubSub from a local bluetooth manager to that client subscription.

Any plans for something like that in the future?

Torsten85 avatar Dec 24 '17 16:12 Torsten85

I asked the same thing yesterday and found out that subscriptions were not necessary for my case: https://github.com/apollographql/apollo-link-state/issues/137

blissi avatar Dec 25 '17 05:12 blissi

@blissi thanks for the tip, didn't thought of that... and it works very well.

So this issue can be closed

Torsten85 avatar Dec 26 '17 17:12 Torsten85

You're welcome. Just one question: Do you also experience the same issue as I do => https://github.com/apollographql/apollo-link-state/issues/139 ?

blissi avatar Dec 27 '17 05:12 blissi

Hey @blissi! Subscriptions are not supported yet, but we're looking to implement them soon. Right now, most browser / React Native device APIs allow you to register a callback to an event listener where you can trigger a mutation. This should cover most use cases for now until we add support for subscriptions.

peggyrayzis avatar Jan 02 '18 17:01 peggyrayzis

@blissi did you manage to find a solution for #139?

snajahi avatar Feb 15 '18 13:02 snajahi

@snajahi I haven't tried it any further and removed apollo link state from my project.

blissi avatar Feb 16 '18 09:02 blissi

@peggyrayzis Hey, any update for this issue now?

zry656565 avatar Jun 19 '18 09:06 zry656565

@peggyrayzis bump. Any news on this? What is the state of things now?

maxim-grishaev avatar Aug 29 '18 14:08 maxim-grishaev

Subscriptions for this would be amazing. Light-years away from Redux or Mobx.

MichelDiz avatar Nov 06 '18 04:11 MichelDiz