diff --git a/graphql/introspection/type.go b/graphql/introspection/type.go index 9aceebdc95..16af79b6b6 100644 --- a/graphql/introspection/type.go +++ b/graphql/introspection/type.go @@ -152,6 +152,10 @@ func (t *Type) EnumValues(includeDeprecated bool) []EnumValue { res := []EnumValue{} for _, val := range t.def.EnumValues { + if !includeDeprecated && val.Directives.ForName("deprecated") != nil { + continue + } + res = append(res, EnumValue{ Name: val.Name, Description: val.Description,