Skip to content

Commit

Permalink
renamed schema.Directive to DirectiveDecl
Browse files Browse the repository at this point in the history
  • Loading branch information
neelance committed Mar 22, 2017
1 parent b616eec commit d6aec0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions internal/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -97,7 +97,7 @@ func (l FieldList) Names() []string {
return names
}

type Directive struct {
type DirectiveDecl struct {
Name string
Desc string
Locs []string
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() == '(' {
Expand Down
2 changes: 1 addition & 1 deletion introspection/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (r *EnumValue) DeprecationReason() *string {
}

type Directive struct {
directive *schema.Directive
directive *schema.DirectiveDecl
}

func (r *Directive) Name() string {
Expand Down

0 comments on commit d6aec0d

Please sign in to comment.