Skip to content

Commit

Permalink
Merge pull request #1028 from abhimanyusinghgaur/master
Browse files Browse the repository at this point in the history
Respect includeDeprecated for EnumValues
  • Loading branch information
vvakame committed Feb 14, 2020
2 parents 30e2375 + 07ffcc8 commit 4ece385
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 4ece385

Please sign in to comment.