cult-of-coders / apollo-live-client

Handles reactive events to easily work with live queries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing variables does not update subscription

Twisterking opened this issue · comments

Hi there,

I (think I) made quite some progress in understanding/using Apollo/GraphQL/Subscriptions but I now ran into the following problem:

Say I have a React component using your <ReactiveQuery/> which has some variables passed as prop. Problem is, that due to you only using componentDidMount() (https://github.com/cult-of-coders/apollo-live-client/blob/master/src/ReactiveQuery.js#L37), (maybe instead of componentDidUpdate()), the subscription is not updated when the variables change.

I do not understand how this should work like that ...

best regards, Patrick

Any help on this? What am I misunderstanding here?