Skip to content

Commit

Permalink
Respect includeDeprecated for EnuValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhimanyu Singh Gaur committed Feb 13, 2020
1 parent 30e2375 commit 07ffcc8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphql/introspection/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 07ffcc8

Please sign in to comment.