Skip to content

Orders type fields in the dump schema command using the sortFields flag. #225

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

Conversation

andrea-sal
Copy link

Currently, the Mutation and Query types are not always ordered consistently, which makes the schema generated by the command unpredictable. This might be due to the change made here.

With this PR, I am introducing the sorting of fields within the types included in the generated schema, using the supported sortFields flag. This way, all fields will always be ordered alphabetically, and the generated schema will be predictable, making it easier, for instance, to verify that the schema generated at runtime matches the expected one.

@andrew-demb andrew-demb merged commit c6f7149 into thecodingmachine:master Dec 31, 2024
@andrew-demb
Copy link
Collaborator

Thank you @andrea-sal

@andrea-sal andrea-sal deleted the order-type-fields-in-dump-schema-command branch January 7, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants