Repository navigation
feat: sorted GraphQL documents - #12318
Conversation
Merging this PR will not alter performance
|
| /// This action natural sorts the named definitions of a document by name: the `scalar`, `type`, | ||
| /// `interface`, `union`, `enum`, and `input` definitions, their `extend` counterparts, | ||
| /// the `directive` definitions, the `fragment` definitions, and the named `query`, | ||
| /// `mutation`, and `subscription` operations. |
There was a problem hiding this comment.
| /// This action natural sorts the named definitions of a document by name: the `scalar`, `type`, | |
| /// `interface`, `union`, `enum`, and `input` definitions, their `extend` counterparts, | |
| /// the `directive` definitions, the `fragment` definitions, and the named `query`, | |
| /// `mutation`, and `subscription` operations. | |
| /// This action natural sorts the named definitions of a document in the following order: | |
| /// 1. The `scalar`, `type`, `interface`, `union`, `enum`, and `input` definitions, their `extend` counterparts. | |
| /// 2. The `directive` definitions, the `fragment` definitions, and the named `query`. | |
| /// 3. The `mutation`, and `subscription` operations. |
What do you think? This this is a "order", a numeric list feels more intuitive.
There was a problem hiding this comment.
Oh wait, that would suggest they are grouped per numeric list entry and sorted within. They aren't, they can be mixed and sorted based on the name. It's just a list of what kind of document definitions are taken in the sorting
There was a problem hiding this comment.
Grouping and sorting within could be a nice improvement later
There was a problem hiding this comment.
There's the possibility that I misunderstood the current docs though. I don't have GraphQL knowledge.
|
@biome-cookie review |
biome-cookie
left a comment
There was a problem hiding this comment.
Review Summary
Review complete. 1 finding was added inline.
Review Status
-
Scope: New GraphQL source assist action
useGraphqlSortedDefinitions -
Branch target: main
-
Changeset: .changeset/calm-seals-sort.md (minor)
-
Brief: Adds
useGraphqlSortedDefinitionsassist action to sort named GraphQL definitions -
Validation: No verified suggested changes were published; findings may be based on static review.
-
Fetch: eca082b...38ce6d8
🦋 Changeset detectedLatest commit: 7636a3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
f4cc12e to
7636a3e
Compare
Summary
Sort GraphQL documents, not sure about the rule name. Should we perhaps rename it to
useGraphqlSortedDocuments?Closes #9137 (last assist)
Partially generated by Claude 5.5 (Sonnet)
Test Plan
Unit tests
Docs