-
Notifications
You must be signed in to change notification settings - Fork 115
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
get-schema has no consistent order of properties #111
Comments
Good point. Would actually be interesting what should be the source of truth here. The server? A certain strategy in the GraphQL CLI? |
That is a good point you're making, @schickling! I just checked using GraphiQL and there the params and enums are also not in alphabetical order. So maybe it's the server who messes the order up every time... I'm using https://github.com/graphql-go/handler. Do you think I should create the issue there instead? |
I think we should strive to reduce diffs to a minimum. That being said, maybe we should aim for a server-independent standard for local schema storage. Alphabetical makes sense, Schema - Query - Mutation - Subscription - Interfaces - Unions - Types - Input Types - Enums, then alphabetical also makes sense. |
I just created graphql-go/handler#34 to order the properties coming from the Go library. |
We've just released a new alpha version channel for GraphQL CLI - We've changed the And for the Those tools should provide you with consistent output between runs. Checkout new instructions in the migration guide and let us know your feedback during that alpha period! Feel free to contact us by opening a new issue or joining our Discord channel; |
I've posted the wrong Discord link, this is the correct one: https://discord.gg/xud7bH9 |
Every time I run
graphql get-schema
, the values of enums and the parameters of queries and mutations are sorted differently inschema.graphql
. This leads to unnecessary changes ingit diff
when checking in theschema.graphql
file. Shouldn't the order of enum values and query/mutation params be alphabetical and therefore consistent?The text was updated successfully, but these errors were encountered: