diff --git a/internal/schema/schema.go b/internal/schema/schema.go index 0cd73265ff3..b5733f3b106 100644 --- a/internal/schema/schema.go +++ b/internal/schema/schema.go @@ -13,7 +13,7 @@ import ( type Schema struct { EntryPoints map[string]NamedType Types map[string]NamedType - Directives map[string]*Directive + Directives map[string]*DirectiveDecl entryPointNames map[string]string objects []*Object @@ -97,7 +97,7 @@ func (l FieldList) Names() []string { return names } -type Directive struct { +type DirectiveDecl struct { Name string Desc string Locs []string @@ -144,7 +144,7 @@ func New() *Schema { s := &Schema{ entryPointNames: make(map[string]string), Types: make(map[string]NamedType), - Directives: make(map[string]*Directive), + Directives: make(map[string]*DirectiveDecl), } for n, t := range Meta.Types { s.Types[n] = t @@ -417,8 +417,8 @@ func parseEnumDecl(l *lexer.Lexer) *Enum { return enum } -func parseDirectiveDecl(l *lexer.Lexer) *Directive { - d := &Directive{} +func parseDirectiveDecl(l *lexer.Lexer) *DirectiveDecl { + d := &DirectiveDecl{} l.ConsumeToken('@') d.Name = l.ConsumeIdent() if l.Peek() == '(' { diff --git a/introspection/introspection.go b/introspection/introspection.go index d9c72872cd4..152b54b1cc6 100644 --- a/introspection/introspection.go +++ b/introspection/introspection.go @@ -294,7 +294,7 @@ func (r *EnumValue) DeprecationReason() *string { } type Directive struct { - directive *schema.Directive + directive *schema.DirectiveDecl } func (r *Directive) Name() string {