Skip to content

Commit

Permalink
Ignore __ fields in instrospection
Browse files Browse the repository at this point in the history
  • Loading branch information
creativej committed Aug 2, 2018
1 parent b38c580 commit c622102
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphql/introspection/type.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package introspection

import (
"strings"

"github.com/vektah/gqlparser/ast"
)

Expand Down Expand Up @@ -63,6 +65,10 @@ func (t *Type) Fields(includeDeprecated bool) []Field {
}
var fields []Field
for _, f := range t.def.Fields {
if strings.HasPrefix(f.Name, "__") {
continue
}

fields = append(fields, Field{
Name: f.Name,
Description: f.Description,
Expand Down

0 comments on commit c622102

Please sign in to comment.