diff --git a/graphql/schema/gqlschema.go b/graphql/schema/gqlschema.go index cd280acfc0b..c587db2e968 100644 --- a/graphql/schema/gqlschema.go +++ b/graphql/schema/gqlschema.go @@ -1020,7 +1020,7 @@ func addTypeOrderable(schema *ast.Schema, defn *ast.Definition) { } for _, fld := range defn.Fields { - if orderable[fld.Type.Name()] { + if fld.Type.NamedType != "" && orderable[fld.Type.NamedType] { order.EnumValues = append(order.EnumValues, &ast.EnumValueDefinition{Name: fld.Name}) } diff --git a/graphql/schema/testdata/schemagen/output/searchables.graphql b/graphql/schema/testdata/schemagen/output/searchables.graphql index 13c37d1f17a..a3bd9dd5fd7 100755 --- a/graphql/schema/testdata/schemagen/output/searchables.graphql +++ b/graphql/schema/testdata/schemagen/output/searchables.graphql @@ -227,9 +227,6 @@ enum PostOrderable { title titleByEverything text - tags - tagsHash - tagsExact publishByYear publishByMonth publishByDay