Hello, I’ve been playing round with subscriptions....
# prisma-whats-new
j
Hello, I’ve been playing round with subscriptions. I hacked up your [World chat example](https://github.com/graphcool-examples/worldchat-subscriptions-example) and it works great for [UPDATED] but not for [CREATED], I get the new array back fine but instead it doesn't render the change β€” this is my code https://github.com/jonheslop/pizza-tracker/blob/master/src/Tracker.js#L63 any pointers would be greatly appreciated
n
@jonheslop hey Jon, I can't pin point the issue, but have you verified that the
updateQueries
method is working correctly?
j
Hey thanks, err
updateQueries
? Do you mean
updateQuery
?
n
hah I see. yep πŸ™‚
so in the
CREATED
case, you do get the data back you said... what's the result of this console.log? https://github.com/jonheslop/pizza-tracker/blob/master/src/Tracker.js#L61
j
yeah i get the new array with +1 item
and when
UPDATED
happens it renders the change fine
you can see the log happen when i create new row
n
I can't see the problem either. Might be worth to create an issue report for
react-apollo
j
ok cool
Thanks
here’s it working fine for an
UPDATE
Thanks for you help πŸ˜„
n
maybe @nikolasburk has more ideas πŸ™‚
j
I feel like it’s probably something really dumb
(on my behalf)
n
@jonheslop I guess it's not related to
CREATED
or
UPDATED
, the only thing that is different is the object you return. Maybe you can try experiment with that, delete some nodes, shuffle them and so on and inspect how this affects the rendering
j
FML β€” i had
allOrder: orders
instead of `allOrders: orders`πŸ˜‚
Thanks for your help
n
...
ouch! even 4 eyes weren't enough to catch this πŸ‘€
j
Ha yeah, thanks for your help anyway πŸ™‚
πŸ™Œ 1