graphql-python / graphene-django

Build powerful, efficient, and flexible GraphQL APIs with seamless Django integration.
http://docs.graphene-python.org/projects/django/en/latest/
MIT License
4.26k stars 767 forks source link

Make `graphql_schema` output deterministic #1511

Open jams2 opened 4 months ago

jams2 commented 4 months ago

Is your feature request related to a problem? Please describe.

We have a CI job that checks that our schema file has been updated, by comparing the output of graphql_schema with the committed file. This intermittently fails due to the fact that the ordering of entries in the schema is non-deterministic.

Describe the solution you'd like

It would be great if the ordering of entries was deterministic - this would solve this issue for my team.

Describe alternatives you've considered

We can write a wrapper for the command, but it would be preferable if this were solved upstream.

Additional context

$ pip freeze | grep graphene
graphene==3.3
graphene-django==3.1.5
jams2 commented 3 months ago

Is this compatible with the project's roadmap? We may be able to submit a patch.

kiendang commented 3 months ago

Is this compatible with the project's roadmap? We may be able to submit a patch.

@jam2 yes PRs are welcome.