GraphQLBundle
GraphQLBundle copied to clipboard
Sort fields and arguments
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | yes |
| BC Break report? | no |
| RFC? | no |
| Version/Branch | n/a |
Fields and arguments could be sorted to improve the type readability.
@ooflorent You mean yaml files?
@ooflorent is think rather introspection and dump-output (.graphql) ?
Okay, the idea is this:
MyType:
type: object
config:
fields:
b:
type: String
a:
type: String
Should produce this:
new ObjectType([
'fields' => [
'a' => …
'b' => …
]
])
Instead of this:
new ObjectType([
'fields' => [
'b' => …
'a' => …
]
])
By having the fields (and arguments) sorted in the type definition, they will be sorted everywhere.