diff --git a/introspection.go b/introspection.go index 51feb42d..8bcf3364 100644 --- a/introspection.go +++ b/introspection.go @@ -426,6 +426,9 @@ func init() { for _, ttype := range schema.TypeMap() { results = append(results, ttype) } + sort.Slice(results, func(i, j int) bool { + return results[i].Name() < results[j].Name() + }) return results, nil } return []Type{}, nil @@ -558,6 +561,9 @@ func init() { } fields = append(fields, field) } + sort.Slice(fields, func(i, j int) bool { + return fields[i].Name < fields[j].Name + }) return fields, nil } return nil, nil @@ -618,6 +624,9 @@ func init() { for _, field := range ttype.Fields() { fields = append(fields, field) } + sort.Slice(fields, func(i, j int) bool { + return fields[i].PrivateName < fields[j].PrivateName + }) return fields, nil } return nil, nil