Skip to content

Sort schema directives in SchemaPrinter. - #2575

Merged
bbakerman merged 1 commit into
graphql-java:masterfrom
folone:gleontiev/schema-directive-sorting
Oct 8, 2021
Merged

bbakerman merged 1 commit into
graphql-java:masterfrom
folone:gleontiev/schema-directive-sorting

Conversation

@folone

@folone folone commented Oct 7, 2021 •

Copy link
Copy Markdown
Contributor

Hello from Twitter!

We have a system that stores the gold schema file, which is generated by the SchemaPrinter. To avoid having to detect sweeping changes in the schema, we rely on stable alphabetical sorting for all the schema elements – types, fields inside of objects, arms inside of enums, directives, scalars, etc. We've noticed that graphql-java does not sort directive definitions. This patch fixes that.

@folone
folone force-pushed the gleontiev/schema-directive-sorting branch from 1917049 to abaa184 Compare October 7, 2021 16:05
@bbakerman

Copy link
Copy Markdown
Member

See also - #2561

I think we will include this PR first and rebase that other one on top of it.

The other PR offers a comre complete sorting mechanism for types as well as type elements (fields / args/ directives)

@bbakerman bbakerman added this to the 18.0 milestone Oct 8, 2021
@bbakerman
bbakerman merged commit e0eb64c into graphql-java:master Oct 8, 2021
@folone

folone commented Oct 8, 2021

Copy link
Copy Markdown
Contributor Author

Thank you!

@folone
folone deleted the gleontiev/schema-directive-sorting branch October 8, 2021 11:02
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.

2 participants