relay icon indicating copy to clipboard operation
relay copied to clipboard

Feature request: stable sort in normalization ASTs

Open rbalicki2 opened this issue 10 months ago • 1 comments

  • I would love it if fields in normalization ASTs were sorted stably, probably in the order: __typename, id, scalar and linked fields sorted by alias, inline fragments, misc
  • We generate inlined queries from normalization ASTs in JS, so this is somewhat slow. (~1.5s for ~300 queries). It's quite nice to be able to see the effect your changes had
  • But, if the fields aren't stably sorted, changes (like removing a fragment) shuffle fields around, making the diff less informative

No big deal, just a suggestion.

rbalicki2 avatar Jan 29 '25 23:01 rbalicki2

We generate inlined queries from normalization ASTs in JS, so this is somewhat slow. (~1.5s for ~300 queries). It's quite nice to be able to see the effect your changes had

I'm not following what you mean here. What are inlined queries? Query text? Could you give an example?

captbaritone avatar Jan 30 '25 00:01 captbaritone