While working on mutations I find myself often having to place debugger; somewhere in relay and try to see what my tracked query is and and the resulting mutation fragment
I wonder if it could be a good idea to provide some sort of diff between tracked and fat query in development ?
Just a thought :)
Great idea, @yuzhi was just talking about adding something like this.
@xuorig I am planning on adding a way to enable a mutation debugger that will print out debug info as Relay go through each mutation config for a mutation. The plan is to print out things like the tracked query, the fat query and the resulting intersected query for FIELDS_CHANGED config. It will also print out things like what connections we are prepending and appending to for RANGE_ADD. The goal is to make it easier to figure out what Relay is doing with the input so it's easier to debug and update mutation configs.
That's really awesome :tada:, exactly what I would need :)
Let me know if you ever need some help with this!
@yuzhi implemented this :-)
Most helpful comment
@xuorig I am planning on adding a way to enable a mutation debugger that will print out debug info as Relay go through each mutation config for a mutation. The plan is to print out things like the tracked query, the fat query and the resulting intersected query for
FIELDS_CHANGEDconfig. It will also print out things like what connections we are prepending and appending to forRANGE_ADD. The goal is to make it easier to figure out what Relay is doing with the input so it's easier to debug and update mutation configs.