Relay: Tracked/Fat query diff

Created on 13 Apr 2016  路  4Comments  路  Source: facebook/relay

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 :)

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_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.

All 4 comments

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 :-)

Was this page helpful?
0 / 5 - 0 ratings