From a5009e76c6e3d2d7f1340ec61a1ac60147970a3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:38:32 +0000 Subject: [PATCH] Bump github.com/graphql-go/graphql from 0.8.0 to 0.8.1 Bumps [github.com/graphql-go/graphql](https://github.com/graphql-go/graphql) from 0.8.0 to 0.8.1. - [Release notes](https://github.com/graphql-go/graphql/releases) - [Commits](https://github.com/graphql-go/graphql/compare/v0.8.0...v0.8.1) --- updated-dependencies: - dependency-name: github.com/graphql-go/graphql dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- .../graphql-go/graphql/language/parser/parser.go | 16 ++++++---------- vendor/modules.txt | 2 +- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index cec6dc9..f771ce2 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/narrative-bi/traefik-graphql-limits go 1.19 -require github.com/graphql-go/graphql v0.8.0 +require github.com/graphql-go/graphql v0.8.1 diff --git a/go.sum b/go.sum index a02c8ea..5f20647 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/graphql-go/graphql v0.8.0 h1:JHRQMeQjofwqVvGwYnr8JnPTY0AxgVy1HpHSGPLdH0I= -github.com/graphql-go/graphql v0.8.0/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= +github.com/graphql-go/graphql v0.8.1 h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc= +github.com/graphql-go/graphql v0.8.1/go.mod h1:nKiHzRM0qopJEwCITUuIsxk9PlVlwIiiI8pnJEhordQ= diff --git a/vendor/github.com/graphql-go/graphql/language/parser/parser.go b/vendor/github.com/graphql-go/graphql/language/parser/parser.go index 4ee1577..4ae3dc3 100644 --- a/vendor/github.com/graphql-go/graphql/language/parser/parser.go +++ b/vendor/github.com/graphql-go/graphql/language/parser/parser.go @@ -19,12 +19,6 @@ var tokenDefinitionFn map[string]parseDefinitionFn func init() { tokenDefinitionFn = make(map[string]parseDefinitionFn) { - // for sign - tokenDefinitionFn[lexer.BRACE_L.String()] = parseOperationDefinition - tokenDefinitionFn[lexer.STRING.String()] = parseTypeSystemDefinition - tokenDefinitionFn[lexer.BLOCK_STRING.String()] = parseTypeSystemDefinition - tokenDefinitionFn[lexer.NAME.String()] = parseTypeSystemDefinition - // for NAME tokenDefinitionFn[lexer.FRAGMENT] = parseFragmentDefinition tokenDefinitionFn[lexer.QUERY] = parseOperationDefinition tokenDefinitionFn[lexer.MUTATION] = parseOperationDefinition @@ -79,8 +73,8 @@ func Parse(p ParseParams) (*ast.Document, error) { return doc, nil } -// TODO: test and expose parseValue as a public -func parseValue(p ParseParams) (ast.Value, error) { +// ParseValue parses params and returns ast value +func ParseValue(p ParseParams) (ast.Value, error) { var value ast.Value var sourceObj *source.Source switch src := p.Source.(type) { @@ -145,8 +139,10 @@ func parseDocument(parser *Parser) (*ast.Document, error) { break } switch kind := parser.Token.Kind; kind { - case lexer.BRACE_L, lexer.NAME, lexer.STRING, lexer.BLOCK_STRING: - item = tokenDefinitionFn[kind.String()] + case lexer.BRACE_L: + item = parseOperationDefinition + case lexer.NAME, lexer.STRING, lexer.BLOCK_STRING: + item = parseTypeSystemDefinition default: return nil, unexpected(parser, lexer.Token{}) } diff --git a/vendor/modules.txt b/vendor/modules.txt index fd4bbc5..57c0e82 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/graphql-go/graphql v0.8.0 +# github.com/graphql-go/graphql v0.8.1 ## explicit; go 1.13 github.com/graphql-go/graphql/gqlerrors github.com/graphql-go/graphql/language/ast