From c6716e030c02f316b887c1d3ee4b443aa3ab6afd Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 1 Apr 2022 00:23:19 +0200 Subject: Update dependencies (#1784) --- .../graphql-go/internal/common/directive.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vendor/github.com/graph-gophers/graphql-go/internal/common/directive.go (limited to 'vendor/github.com/graph-gophers/graphql-go/internal/common/directive.go') diff --git a/vendor/github.com/graph-gophers/graphql-go/internal/common/directive.go b/vendor/github.com/graph-gophers/graphql-go/internal/common/directive.go new file mode 100644 index 00000000..f767e28f --- /dev/null +++ b/vendor/github.com/graph-gophers/graphql-go/internal/common/directive.go @@ -0,0 +1,18 @@ +package common + +import "github.com/graph-gophers/graphql-go/types" + +func ParseDirectives(l *Lexer) types.DirectiveList { + var directives types.DirectiveList + for l.Peek() == '@' { + l.ConsumeToken('@') + d := &types.Directive{} + d.Name = l.ConsumeIdentWithLoc() + d.Name.Loc.Column-- + if l.Peek() == '(' { + d.Arguments = ParseArgumentList(l) + } + directives = append(directives, d) + } + return directives +} -- cgit v1.2.3