apollographql / graphql-tag

A JavaScript template literal tag that parses GraphQL queries
MIT License
2.32k stars 177 forks source link

Not an issue but a feature request - Sorting query fields #698

Open kuda1992 opened 1 year ago

kuda1992 commented 1 year ago

This is not an issue however I was wondering is there some tool which can sort the queries alphabetically.

for example sorting the fragment fragment PayslipPerson on Person { earnings contributions deductions }

I am currently using graphql-eslint but it does not sort the queries only the schema.

dimaMachina commented 1 year ago

@kuda1992 graphql-eslint sort selections https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/alphabetize.md#correct-2