Open Ambro17 opened 3 years ago
@Ambro17 is this still valid for you? You want the schema to print the root types at the top right?
I wonder if we can take this opportunity to also maybe order the rest of types
This function from graphql-core might be useful here: https://github.com/graphql-python/graphql-core/blob/5f6a1944cf6923f6249d1575f5b3aad87e629c66/src/graphql/utilities/lexicographic_sort_schema.py
When using the api SDL (Schema definition language) as a review tool for schema, changes it's really useful to print the root first, then the children nodes. Graphql-core respects that, but strawberry's implementation does not
Minimal demo
After executing
python bug_demo.py
one can see that strawberry prints thisInstead of graphql-core output
Versions
strawberry-graphql==0.65.3
graphql-core==3.1.5
Python 3.8.5
Upvote & Fund