Closed nikitastupin closed 3 years ago
We sort JSON schema by keys:
https://github.com/nikitastupin/clairvoyance/blob/26eecd1aac2b61c0c688aff630bb4ebfcc731bb0/clairvoyance/graphql.py#L96
but it's not enough for fields to be sorted by name. So we should first sort self.types.keys() and then iterate through them instead of:
self.types.keys()
https://github.com/nikitastupin/clairvoyance/blob/26eecd1aac2b61c0c688aff630bb4ebfcc731bb0/clairvoyance/graphql.py#L93
For the reason, that we use graphql-voyager as the tool for displaying the generated schema, i think we can close this issue, because there already has functionality for sort in alphabetically
We sort JSON schema by keys:
https://github.com/nikitastupin/clairvoyance/blob/26eecd1aac2b61c0c688aff630bb4ebfcc731bb0/clairvoyance/graphql.py#L96
but it's not enough for fields to be sorted by name. So we should first sort
self.types.keys()
and then iterate through them instead of:https://github.com/nikitastupin/clairvoyance/blob/26eecd1aac2b61c0c688aff630bb4ebfcc731bb0/clairvoyance/graphql.py#L93