Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: stable sort in normalization ASTs #4899

Open
rbalicki2 opened this issue Jan 29, 2025 · 1 comment
Open

Feature request: stable sort in normalization ASTs #4899

rbalicki2 opened this issue Jan 29, 2025 · 1 comment

Comments

@rbalicki2
Copy link
Contributor

rbalicki2 commented Jan 29, 2025

  • 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 rbalicki2 changed the title Feat: stable sort in normalization ASTs Feature request: stable sort in normalization ASTs Jan 29, 2025
@captbaritone
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants