From c622102b9733b89451a5134e9e328236f88fb064 Mon Sep 17 00:00:00 2001 From: creativej Date: Thu, 2 Aug 2018 13:33:36 +1000 Subject: [PATCH] Ignore __ fields in instrospection --- graphql/introspection/type.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graphql/introspection/type.go b/graphql/introspection/type.go index 9c65b7ee81..72f993f307 100644 --- a/graphql/introspection/type.go +++ b/graphql/introspection/type.go @@ -1,6 +1,8 @@ package introspection import ( + "strings" + "github.com/vektah/gqlparser/ast" ) @@ -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,