Fork me on GitHub
#graphql
<
2017-08-22
>
hmaurer17:08:57

Is anyone here fairly familiar with either Relay or Apollo Client?

boubalou18:08:33

🙋 with apollo client under EmberJS.

hmaurer19:08:49

@boubalou that could work! I have a bit of an edge-case question on how to handle a specific kind of mutation

hmaurer19:08:32

I am not using graphql.cool but their example demonstrates my issue

hmaurer19:08:05

Basically, I have a mutation (like on the example) which “connects” two nodes

hmaurer19:08:44

usually, you want your mutations to return all the data that might have changed

hmaurer19:08:55

so that you can update your local cache (in this case, managed by apollo)

hmaurer19:08:07

either automatically or imperatively

hmaurer19:08:24

in this scenario, however, the whole “subtree” under the “contactDetails” field may have changed

hmaurer19:08:58

e.g. I could have a view which queries deep inside “contactDetails”, and when I set a new node for “contactDetails” on my object the whole data this view is rendering might be affected

hmaurer19:08:12

and I can’t know which fields to ask for in the mutation payload in advance

hmaurer19:08:21

as this may be an arbitrarily large subtree

hmaurer19:08:00

if that makes any sense