Closed rohit-ravikoti closed 7 years ago
Sorry for my late reply. I think the query is already correct. Basically, when you use setVariables({...variables})
, Relay tries to intersect the changes against the "tracked query". So, Relay could send only the changed parts across the wire for the sake of minimizing the network usage. You can learn more on this video.
I'm going to close this issue for now. Please feel free to continue the discussion here if you had more question.
Hi! For some reason, if I generate a root query which takes in parameters before injecting the child component, like so:
Relay originally generates this query:
However, If the Component's relay container has variables of its own, running
this.props.relay.setVariables({...variables})
completely changes the request query generated by relay into something like this:I'm not sure if this is an error with relay itself or if I am doing something wrong. Could someone help?