diff --git a/cmd/ambient.go b/cmd/ambient.go index 7838fdf16d5..0f3655d34fa 100644 --- a/cmd/ambient.go +++ b/cmd/ambient.go @@ -5,6 +5,6 @@ import ( // don't prune unused code for us. Both lists should be kept in sync. _ "github.com/99designs/gqlgen/graphql" _ "github.com/99designs/gqlgen/graphql/introspection" - _ "github.com/vektah/gqlparser" - _ "github.com/vektah/gqlparser/ast" + _ "github.com/vektah/gqlparser/v2" + _ "github.com/vektah/gqlparser/v2/ast" ) diff --git a/codegen/args.go b/codegen/args.go index 1d3e51aa3ad..20a26e97542 100644 --- a/codegen/args.go +++ b/codegen/args.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/codegen/templates" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type ArgSet struct { diff --git a/codegen/config/binder.go b/codegen/config/binder.go index 00cb5f62fd9..bea5c8f309d 100644 --- a/codegen/config/binder.go +++ b/codegen/config/binder.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/codegen/templates" "github.com/99designs/gqlgen/internal/code" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) // Binder connects graphql types to golang types using static analysis diff --git a/codegen/config/binder_test.go b/codegen/config/binder_test.go index a5c35bd1852..67e9ed011ba 100644 --- a/codegen/config/binder_test.go +++ b/codegen/config/binder_test.go @@ -7,8 +7,8 @@ import ( "github.com/99designs/gqlgen/internal/code" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) func TestBindingToInvalid(t *testing.T) { diff --git a/codegen/config/config.go b/codegen/config/config.go index da8f8e2da3c..af9a610a175 100644 --- a/codegen/config/config.go +++ b/codegen/config/config.go @@ -11,8 +11,8 @@ import ( "github.com/99designs/gqlgen/internal/code" "github.com/pkg/errors" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" "gopkg.in/yaml.v2" ) diff --git a/codegen/config/config_test.go b/codegen/config/config_test.go index 28adff3f712..dbea2811b68 100644 --- a/codegen/config/config_test.go +++ b/codegen/config/config_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" "github.com/99designs/gqlgen/internal/code" ) diff --git a/codegen/data.go b/codegen/data.go index 513723ebb53..bedbef9d441 100644 --- a/codegen/data.go +++ b/codegen/data.go @@ -5,7 +5,7 @@ import ( "sort" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" "github.com/99designs/gqlgen/codegen/config" ) diff --git a/codegen/directive.go b/codegen/directive.go index f3a3c26208b..5d4c038ffa7 100644 --- a/codegen/directive.go +++ b/codegen/directive.go @@ -7,7 +7,7 @@ import ( "github.com/99designs/gqlgen/codegen/templates" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type DirectiveList map[string]*Directive diff --git a/codegen/field.go b/codegen/field.go index 8f6e9d52bbe..c12520b703d 100644 --- a/codegen/field.go +++ b/codegen/field.go @@ -11,7 +11,7 @@ import ( "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/codegen/templates" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type Field struct { diff --git a/codegen/generated!.gotpl b/codegen/generated!.gotpl index bcfab0fa943..03be286e1e1 100644 --- a/codegen/generated!.gotpl +++ b/codegen/generated!.gotpl @@ -8,8 +8,8 @@ {{ reserveImport "errors" }} {{ reserveImport "bytes" }} -{{ reserveImport "github.com/vektah/gqlparser" }} -{{ reserveImport "github.com/vektah/gqlparser/ast" }} +{{ reserveImport "github.com/vektah/gqlparser/v2" }} +{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }} {{ reserveImport "github.com/99designs/gqlgen/graphql" }} {{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }} diff --git a/codegen/interface.go b/codegen/interface.go index 0ccbf87cda1..a55ce1e6bf9 100644 --- a/codegen/interface.go +++ b/codegen/interface.go @@ -5,7 +5,7 @@ import ( "go/types" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" "github.com/99designs/gqlgen/codegen/config" ) diff --git a/codegen/object.go b/codegen/object.go index 18cfd29bed6..31fe38bdbf7 100644 --- a/codegen/object.go +++ b/codegen/object.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/codegen/config" "github.com/pkg/errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type GoFieldType int diff --git a/codegen/testserver/generated.go b/codegen/testserver/generated.go index 53ac24f87bf..46e585d405b 100644 --- a/codegen/testserver/generated.go +++ b/codegen/testserver/generated.go @@ -17,8 +17,8 @@ import ( invalid_packagename "github.com/99designs/gqlgen/codegen/testserver/invalid-packagename" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/complexity/complexity.go b/complexity/complexity.go index d5b46bf451a..1877aae5fbd 100644 --- a/complexity/complexity.go +++ b/complexity/complexity.go @@ -2,7 +2,7 @@ package complexity import ( "github.com/99designs/gqlgen/graphql" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) func Calculate(es graphql.ExecutableSchema, op *ast.OperationDefinition, vars map[string]interface{}) int { diff --git a/complexity/complexity_test.go b/complexity/complexity_test.go index a7a2f25565b..0c4be24e1ca 100644 --- a/complexity/complexity_test.go +++ b/complexity/complexity_test.go @@ -6,8 +6,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) var schema = gqlparser.MustLoadSchema( diff --git a/docs/content/reference/errors.md b/docs/content/reference/errors.md index db39b41a570..361813b259b 100644 --- a/docs/content/reference/errors.md +++ b/docs/content/reference/errors.md @@ -19,8 +19,8 @@ package foo import ( "context" - - "github.com/vektah/gqlparser/gqlerror" + + "github.com/vektah/gqlparser/v2/gqlerror" "github.com/99designs/gqlgen/graphql" ) diff --git a/example/chat/generated.go b/example/chat/generated.go index 17657a5ec06..f8a2eb260f9 100644 --- a/example/chat/generated.go +++ b/example/chat/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/config/generated.go b/example/config/generated.go index 2f42596f7fb..e2a8e3604f3 100644 --- a/example/config/generated.go +++ b/example/config/generated.go @@ -12,8 +12,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/dataloader/generated.go b/example/dataloader/generated.go index 9c5fd599828..a42b79f08fe 100644 --- a/example/dataloader/generated.go +++ b/example/dataloader/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/federation/accounts/graph/generated/generated.go b/example/federation/accounts/graph/generated/generated.go index dd379debd27..09a43ea4ae1 100644 --- a/example/federation/accounts/graph/generated/generated.go +++ b/example/federation/accounts/graph/generated/generated.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" "github.com/99designs/gqlgen/plugin/federation/fedruntime" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/federation/products/graph/generated/generated.go b/example/federation/products/graph/generated/generated.go index 4b71ac3c01c..735fb65f8c2 100644 --- a/example/federation/products/graph/generated/generated.go +++ b/example/federation/products/graph/generated/generated.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" "github.com/99designs/gqlgen/plugin/federation/fedruntime" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/federation/reviews/graph/generated/generated.go b/example/federation/reviews/graph/generated/generated.go index 2c4fd44a989..e81fb1e6e7f 100644 --- a/example/federation/reviews/graph/generated/generated.go +++ b/example/federation/reviews/graph/generated/generated.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" "github.com/99designs/gqlgen/plugin/federation/fedruntime" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/fileupload/generated.go b/example/fileupload/generated.go index ccc53004cec..125846e6dfd 100644 --- a/example/fileupload/generated.go +++ b/example/fileupload/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/example/fileupload/model" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/scalars/generated.go b/example/scalars/generated.go index 764f63314c8..c28fca3b7d3 100644 --- a/example/scalars/generated.go +++ b/example/scalars/generated.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/example/scalars/model" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/selection/generated.go b/example/selection/generated.go index 29df5e30486..d6d7733f15d 100644 --- a/example/selection/generated.go +++ b/example/selection/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/selection/selection.go b/example/selection/selection.go index f0b163dd1fc..5890d14ab9f 100644 --- a/example/selection/selection.go +++ b/example/selection/selection.go @@ -8,7 +8,7 @@ import ( "time" "github.com/99designs/gqlgen/graphql" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type Resolver struct{} diff --git a/example/starwars/generated/exec.go b/example/starwars/generated/exec.go index c51b74bd58e..e5757e6f31a 100644 --- a/example/starwars/generated/exec.go +++ b/example/starwars/generated/exec.go @@ -15,8 +15,8 @@ import ( "github.com/99designs/gqlgen/example/starwars/models" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/todo/generated.go b/example/todo/generated.go index e3c2a40b137..ed03217ac23 100644 --- a/example/todo/generated.go +++ b/example/todo/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/example/type-system-extension/generated.go b/example/type-system-extension/generated.go index d6e052d240f..29b423d813c 100644 --- a/example/type-system-extension/generated.go +++ b/example/type-system-extension/generated.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/go.mod b/go.mod index 7726e1ddfe5..d143c3bf8ac 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,13 @@ module github.com/99designs/gqlgen go 1.12 require ( - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/agnivade/levenshtein v1.0.3 // indirect github.com/go-chi/chi v3.3.2+incompatible github.com/gogo/protobuf v1.0.0 // indirect github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f // indirect github.com/gorilla/mux v1.6.1 // indirect github.com/gorilla/websocket v1.2.0 github.com/hashicorp/golang-lru v0.5.0 - github.com/kr/pretty v0.1.0 // indirect github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007 github.com/mattn/go-colorable v0.1.4 @@ -22,13 +21,12 @@ require ( github.com/rs/cors v1.6.0 github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371 // indirect github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0 // indirect - github.com/stretchr/testify v1.3.0 + github.com/stretchr/testify v1.4.0 github.com/urfave/cli v1.20.0 github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e - github.com/vektah/gqlparser v1.3.1 + github.com/vektah/gqlparser/v2 v2.0.1 golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect - gopkg.in/yaml.v2 v2.2.2 + gopkg.in/yaml.v2 v2.2.4 sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755 sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 // indirect ) diff --git a/go.sum b/go.sum index 06f3b01ccf0..265be010631 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,17 @@ github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.0.3 h1:M5ZnqLOoZR8ygVq0FfkXsNOKzMCk0xRiow0R5+5VkQ0= +github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c h1:TUuUh0Xgj97tLMNtWtNvI9mIV6isjEb9lBMNv+77IGM= +github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/go-chi/chi v3.3.2+incompatible h1:uQNcQN3NsV1j4ANsPh42P4ew4t6rnRbJb8frvpp31qQ= github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM= @@ -44,8 +50,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371 h1:SWV2fHctRpRrp49VXJ6UZja7gU9QLHwRpIPBN89SKEo= github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0 h1:JJV9CsgM9EC9w2iVkwuz+sMx8yRFe89PJRUrv6hPCIA= @@ -53,14 +59,14 @@ github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJV github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e h1:+w0Zm/9gaWpEAyDlU1eKOuk5twTjAjuevXqcJJw8hrg= github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser v1.3.1 h1:8b0IcD3qZKWJQHSzynbDlrtP3IxVydZ2DZepCGofqfU= -github.com/vektah/gqlparser v1.3.1/go.mod h1:bkVf0FX+Stjg/MHnm8mEyubuaArhNEqfQhF+OTiAL74= +github.com/vektah/gqlparser/v2 v2.0.1 h1:xgl5abVnsd4hkN9rk65OJID9bfcLSMuTaTcZj777q1o= +github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -85,10 +91,12 @@ golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapK golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755 h1:d2maSb13hr/ArmfK3rW+wNUKKfytCol7W1/vDHxMPiE= sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 h1:e1sMhtVq9AfcEy8AXNb8eSg6gbzfdpYhoNqnPJa+GzI= diff --git a/graphql/context_field.go b/graphql/context_field.go index 802b60e4c5e..3c3385042bb 100644 --- a/graphql/context_field.go +++ b/graphql/context_field.go @@ -3,6 +3,8 @@ package graphql import ( "context" "time" + + "github.com/vektah/gqlparser/v2/ast" ) type key string @@ -39,13 +41,13 @@ type FieldStats struct { Completed time.Time } -func (r *FieldContext) Path() []interface{} { - var path []interface{} +func (r *FieldContext) Path() ast.Path { + var path ast.Path for it := r; it != nil; it = it.Parent { if it.Index != nil { - path = append(path, *it.Index) + path = append(path, ast.PathIndex(*it.Index)) } else if it.Field.Field != nil { - path = append(path, it.Field.Alias) + path = append(path, ast.PathName(it.Field.Alias)) } } @@ -75,7 +77,7 @@ func WithFieldContext(ctx context.Context, rc *FieldContext) context.Context { return context.WithValue(ctx, resolverCtx, rc) } -func equalPath(a []interface{}, b []interface{}) bool { +func equalPath(a ast.Path, b ast.Path) bool { if len(a) != len(b) { return false } diff --git a/graphql/context_field_test.go b/graphql/context_field_test.go index 05e6cd1a741..3bdfe47eae2 100644 --- a/graphql/context_field_test.go +++ b/graphql/context_field_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) func TestGetResolverContext(t *testing.T) { diff --git a/graphql/context_operation.go b/graphql/context_operation.go index cf1a279ec7b..3d74a806de6 100644 --- a/graphql/context_operation.go +++ b/graphql/context_operation.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) // Deprecated: Please update all references to OperationContext instead diff --git a/graphql/context_operation_test.go b/graphql/context_operation_test.go index 1086c237fc1..bb4d9212aba 100644 --- a/graphql/context_operation_test.go +++ b/graphql/context_operation_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) func TestGetOperationContext(t *testing.T) { diff --git a/graphql/context_response.go b/graphql/context_response.go index 4031752b871..160dfc77d7d 100644 --- a/graphql/context_response.go +++ b/graphql/context_response.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) type responseContext struct { diff --git a/graphql/context_response_test.go b/graphql/context_response_test.go index 59d80f4403a..aa300229c4e 100644 --- a/graphql/context_response_test.go +++ b/graphql/context_response_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/ast" + "github.com/vektah/gqlparser/v2/gqlerror" ) func TestAddError(t *testing.T) { @@ -43,7 +43,7 @@ func TestAddError(t *testing.T) { AddError(ctx, errors.New("bar")) AddError(ctx, &gqlerror.Error{ Message: "foo3", - Path: append(child.Path(), "works"), + Path: append(child.Path(), ast.PathName("works")), }) specs := []struct { diff --git a/graphql/errcode/codes.go b/graphql/errcode/codes.go index 746d0544fef..774ab7a9ea5 100644 --- a/graphql/errcode/codes.go +++ b/graphql/errcode/codes.go @@ -1,7 +1,7 @@ package errcode import ( - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) const ValidationFailed = "GRAPHQL_VALIDATION_FAILED" diff --git a/graphql/error.go b/graphql/error.go index a7a6769beda..201058a2f63 100644 --- a/graphql/error.go +++ b/graphql/error.go @@ -3,7 +3,7 @@ package graphql import ( "context" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) type ErrorPresenterFunc func(ctx context.Context, err error) *gqlerror.Error diff --git a/graphql/executable_schema.go b/graphql/executable_schema.go index 7f0df9104ef..7183965ed55 100644 --- a/graphql/executable_schema.go +++ b/graphql/executable_schema.go @@ -6,7 +6,7 @@ import ( "context" "fmt" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type ExecutableSchema interface { diff --git a/graphql/executable_schema_mock.go b/graphql/executable_schema_mock.go index c099de793e9..0c021d3d003 100644 --- a/graphql/executable_schema_mock.go +++ b/graphql/executable_schema_mock.go @@ -5,7 +5,7 @@ package graphql import ( "context" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" "sync" ) diff --git a/graphql/handler.go b/graphql/handler.go index 077701cc42b..e74af2f039a 100644 --- a/graphql/handler.go +++ b/graphql/handler.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) type ( diff --git a/graphql/handler/apollotracing/tracer.go b/graphql/handler/apollotracing/tracer.go index b4b0cb312f9..ac3c66a0d62 100644 --- a/graphql/handler/apollotracing/tracer.go +++ b/graphql/handler/apollotracing/tracer.go @@ -6,6 +6,7 @@ import ( "time" "github.com/99designs/gqlgen/graphql" + "github.com/vektah/gqlparser/v2/ast" ) type ( @@ -30,7 +31,7 @@ type ( } ResolverExecution struct { - Path []interface{} `json:"path"` + Path ast.Path `json:"path"` ParentType string `json:"parentType"` FieldName string `json:"fieldName"` ReturnType string `json:"returnType"` diff --git a/graphql/handler/apollotracing/tracer_test.go b/graphql/handler/apollotracing/tracer_test.go index d78d61c47c7..f83cfc415fb 100644 --- a/graphql/handler/apollotracing/tracer_test.go +++ b/graphql/handler/apollotracing/tracer_test.go @@ -9,7 +9,6 @@ import ( "time" "github.com/99designs/gqlgen/graphql" - "github.com/99designs/gqlgen/graphql/handler/apollotracing" "github.com/99designs/gqlgen/graphql/handler/extension" "github.com/99designs/gqlgen/graphql/handler/lru" @@ -17,7 +16,8 @@ import ( "github.com/99designs/gqlgen/graphql/handler/transport" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/ast" + "github.com/vektah/gqlparser/v2/gqlerror" ) func TestApolloTracing(t *testing.T) { @@ -59,7 +59,7 @@ func TestApolloTracing(t *testing.T) { require.EqualValues(t, 700, tracing.Execution.Resolvers[0].StartOffset) require.EqualValues(t, 100, tracing.Execution.Resolvers[0].Duration) - require.EqualValues(t, []interface{}{"name"}, tracing.Execution.Resolvers[0].Path) + require.EqualValues(t, ast.Path{ast.PathName("name")}, tracing.Execution.Resolvers[0].Path) require.EqualValues(t, "Query", tracing.Execution.Resolvers[0].ParentType) require.EqualValues(t, "name", tracing.Execution.Resolvers[0].FieldName) require.EqualValues(t, "String!", tracing.Execution.Resolvers[0].ReturnType) diff --git a/graphql/handler/debug/tracer.go b/graphql/handler/debug/tracer.go index 6115f5ad44a..3a4c8436b4b 100644 --- a/graphql/handler/debug/tracer.go +++ b/graphql/handler/debug/tracer.go @@ -62,18 +62,7 @@ func (a Tracer) InterceptResponse(ctx context.Context, next graphql.ResponseHand fmt.Fprintln(a.out, " resp:", Green(stringify(resp))) for _, err := range resp.Errors { - pathstr := "" - for i, bit := range err.Path { - if biti, ok := bit.(int); ok { - pathstr += fmt.Sprintf("[%d]", biti) - } else { - if i != 0 { - pathstr += "." - } - pathstr += fmt.Sprint(bit) - } - } - fmt.Fprintln(a.out, " error:", Bold(pathstr+":"), Red(err.Message)) + fmt.Fprintln(a.out, " error:", Bold(err.Path.String()+":"), Red(err.Message)) } fmt.Fprintln(a.out, "}") fmt.Fprintln(a.out) diff --git a/graphql/handler/executor.go b/graphql/handler/executor.go index 9bc0b2ab409..2402284196c 100644 --- a/graphql/handler/executor.go +++ b/graphql/handler/executor.go @@ -5,10 +5,10 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" - "github.com/vektah/gqlparser/ast" - "github.com/vektah/gqlparser/gqlerror" - "github.com/vektah/gqlparser/parser" - "github.com/vektah/gqlparser/validator" + "github.com/vektah/gqlparser/v2/ast" + "github.com/vektah/gqlparser/v2/gqlerror" + "github.com/vektah/gqlparser/v2/parser" + "github.com/vektah/gqlparser/v2/validator" ) type executor struct { diff --git a/graphql/handler/extension/apq.go b/graphql/handler/extension/apq.go index 1ea0389fe02..83f4c1bfc8a 100644 --- a/graphql/handler/extension/apq.go +++ b/graphql/handler/extension/apq.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/graphql/errcode" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" "github.com/99designs/gqlgen/graphql" "github.com/mitchellh/mapstructure" diff --git a/graphql/handler/extension/complexity.go b/graphql/handler/extension/complexity.go index 30a7a3ff4cd..2d853802bf3 100644 --- a/graphql/handler/extension/complexity.go +++ b/graphql/handler/extension/complexity.go @@ -7,7 +7,7 @@ import ( "github.com/99designs/gqlgen/complexity" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) const errComplexityLimit = "COMPLEXITY_LIMIT_EXCEEDED" diff --git a/graphql/handler/extension/introspection.go b/graphql/handler/extension/introspection.go index 6cfc8bace5a..acc5db2fbcc 100644 --- a/graphql/handler/extension/introspection.go +++ b/graphql/handler/extension/introspection.go @@ -4,7 +4,7 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) // EnableIntrospection enables clients to reflect all of the types available on the graph. diff --git a/graphql/handler/server.go b/graphql/handler/server.go index 042bd588a28..61671f89053 100644 --- a/graphql/handler/server.go +++ b/graphql/handler/server.go @@ -11,7 +11,7 @@ import ( "github.com/99designs/gqlgen/graphql/handler/extension" "github.com/99designs/gqlgen/graphql/handler/lru" "github.com/99designs/gqlgen/graphql/handler/transport" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) type ( diff --git a/graphql/handler/server_test.go b/graphql/handler/server_test.go index a431a14288d..6202a0a2f7a 100644 --- a/graphql/handler/server_test.go +++ b/graphql/handler/server_test.go @@ -12,9 +12,9 @@ import ( "github.com/99designs/gqlgen/graphql/handler/transport" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" - "github.com/vektah/gqlparser/gqlerror" - "github.com/vektah/gqlparser/parser" + "github.com/vektah/gqlparser/v2/ast" + "github.com/vektah/gqlparser/v2/gqlerror" + "github.com/vektah/gqlparser/v2/parser" ) func TestServer(t *testing.T) { diff --git a/graphql/handler/testserver/testserver.go b/graphql/handler/testserver/testserver.go index a434091474f..3e0f0e1b863 100644 --- a/graphql/handler/testserver/testserver.go +++ b/graphql/handler/testserver/testserver.go @@ -7,8 +7,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/handler" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // New provides a server for use in tests that isn't relying on generated code. It isnt a perfect reproduction of diff --git a/graphql/handler/transport/error.go b/graphql/handler/transport/error.go index e03481c9c0d..b1aeaf144dd 100644 --- a/graphql/handler/transport/error.go +++ b/graphql/handler/transport/error.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/99designs/gqlgen/graphql" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) // SendError sends a best effort error to a raw response writer. It assumes the client can understand the standard diff --git a/graphql/handler/transport/http_form_test.go b/graphql/handler/transport/http_form_test.go index b41e216e559..0a2d5c006a3 100644 --- a/graphql/handler/transport/http_form_test.go +++ b/graphql/handler/transport/http_form_test.go @@ -13,8 +13,8 @@ import ( "github.com/99designs/gqlgen/graphql/handler" "github.com/99designs/gqlgen/graphql/handler/transport" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) func TestFileUpload(t *testing.T) { diff --git a/graphql/handler/transport/http_get.go b/graphql/handler/transport/http_get.go index 8cec6a62135..35d9a58be4c 100644 --- a/graphql/handler/transport/http_get.go +++ b/graphql/handler/transport/http_get.go @@ -8,8 +8,8 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" - "github.com/vektah/gqlparser/ast" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/ast" + "github.com/vektah/gqlparser/v2/gqlerror" ) // GET implements the GET side of the default HTTP transport diff --git a/graphql/handler/transport/util.go b/graphql/handler/transport/util.go index d2de3664304..ce845c1964c 100644 --- a/graphql/handler/transport/util.go +++ b/graphql/handler/transport/util.go @@ -6,7 +6,7 @@ import ( "io" "github.com/99designs/gqlgen/graphql" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) func writeJson(w io.Writer, response *graphql.Response) { diff --git a/graphql/handler/transport/websocket.go b/graphql/handler/transport/websocket.go index 57552afb80f..a59574f545a 100644 --- a/graphql/handler/transport/websocket.go +++ b/graphql/handler/transport/websocket.go @@ -13,7 +13,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" "github.com/gorilla/websocket" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) const ( diff --git a/graphql/handler/transport/websocket_test.go b/graphql/handler/transport/websocket_test.go index 8cc984398f9..15bf4515095 100644 --- a/graphql/handler/transport/websocket_test.go +++ b/graphql/handler/transport/websocket_test.go @@ -17,8 +17,8 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) func TestWebsocket(t *testing.T) { diff --git a/graphql/introspection/introspection.go b/graphql/introspection/introspection.go index ca0b065f83e..5239c92839e 100644 --- a/graphql/introspection/introspection.go +++ b/graphql/introspection/introspection.go @@ -1,7 +1,7 @@ // introspection implements the spec defined in https://github.com/facebook/graphql/blob/master/spec/Section%204%20--%20Introspection.md#schema-introspection package introspection -import "github.com/vektah/gqlparser/ast" +import "github.com/vektah/gqlparser/v2/ast" type ( Directive struct { diff --git a/graphql/introspection/schema.go b/graphql/introspection/schema.go index a57272d525a..044e91d6e98 100644 --- a/graphql/introspection/schema.go +++ b/graphql/introspection/schema.go @@ -3,7 +3,7 @@ package introspection import ( "strings" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type Schema struct { diff --git a/graphql/introspection/type.go b/graphql/introspection/type.go index 16af79b6b6b..f842fa64510 100644 --- a/graphql/introspection/type.go +++ b/graphql/introspection/type.go @@ -3,7 +3,7 @@ package introspection import ( "strings" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type Type struct { diff --git a/graphql/introspection/type_test.go b/graphql/introspection/type_test.go index 7259e02cada..1f3b9102766 100644 --- a/graphql/introspection/type_test.go +++ b/graphql/introspection/type_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) func TestType(t *testing.T) { diff --git a/graphql/jsonw_test.go b/graphql/jsonw_test.go index 856f1b9cdde..1bba9fcf37c 100644 --- a/graphql/jsonw_test.go +++ b/graphql/jsonw_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) func TestJsonWriter(t *testing.T) { diff --git a/graphql/recovery.go b/graphql/recovery.go index d2cf9114287..5c3c1027eb0 100644 --- a/graphql/recovery.go +++ b/graphql/recovery.go @@ -7,7 +7,7 @@ import ( "os" "runtime/debug" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) type RecoverFunc func(ctx context.Context, err interface{}) (userMessage error) diff --git a/graphql/response.go b/graphql/response.go index 6fe55d56dc4..0d36049a336 100644 --- a/graphql/response.go +++ b/graphql/response.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) // Errors are intentionally serialized first based on the advice in diff --git a/integration/generated.go b/integration/generated.go index e8516821fe9..d5c3d89853f 100644 --- a/integration/generated.go +++ b/integration/generated.go @@ -14,8 +14,8 @@ import ( "github.com/99designs/gqlgen/graphql/introspection" models "github.com/99designs/gqlgen/integration/models-go" "github.com/99designs/gqlgen/integration/remote_api" - "github.com/vektah/gqlparser" - "github.com/vektah/gqlparser/ast" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** diff --git a/integration/server/server.go b/integration/server/server.go index 63f2eca37d0..b7b66ebd8d3 100644 --- a/integration/server/server.go +++ b/integration/server/server.go @@ -13,7 +13,7 @@ import ( "github.com/99designs/gqlgen/graphql/playground" "github.com/99designs/gqlgen/integration" "github.com/pkg/errors" - "github.com/vektah/gqlparser/gqlerror" + "github.com/vektah/gqlparser/v2/gqlerror" ) const defaultPort = "8080" diff --git a/plugin/federation/federation.go b/plugin/federation/federation.go index 58f503494c2..40e812a7bb0 100644 --- a/plugin/federation/federation.go +++ b/plugin/federation/federation.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" "github.com/99designs/gqlgen/codegen" "github.com/99designs/gqlgen/codegen/config" diff --git a/plugin/modelgen/models.go b/plugin/modelgen/models.go index afcf65d69af..82bbdcc5ca4 100644 --- a/plugin/modelgen/models.go +++ b/plugin/modelgen/models.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/codegen/templates" "github.com/99designs/gqlgen/plugin" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type BuildMutateHook = func(b *ModelBuild) *ModelBuild diff --git a/plugin/modelgen/models.gotpl b/plugin/modelgen/models.gotpl index a4579f87612..e58d5b21a4e 100644 --- a/plugin/modelgen/models.gotpl +++ b/plugin/modelgen/models.gotpl @@ -7,8 +7,8 @@ {{ reserveImport "errors" }} {{ reserveImport "bytes" }} -{{ reserveImport "github.com/vektah/gqlparser" }} -{{ reserveImport "github.com/vektah/gqlparser/ast" }} +{{ reserveImport "github.com/vektah/gqlparser/v2" }} +{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }} {{ reserveImport "github.com/99designs/gqlgen/graphql" }} {{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }} diff --git a/plugin/plugin.go b/plugin/plugin.go index 3ab5970c27d..7de36bd8cd5 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -5,7 +5,7 @@ package plugin import ( "github.com/99designs/gqlgen/codegen" "github.com/99designs/gqlgen/codegen/config" - "github.com/vektah/gqlparser/ast" + "github.com/vektah/gqlparser/v2/ast" ) type Plugin interface { diff --git a/plugin/resolvergen/resolver.gotpl b/plugin/resolvergen/resolver.gotpl index 3894ef745ea..4e18e3bebe3 100644 --- a/plugin/resolvergen/resolver.gotpl +++ b/plugin/resolvergen/resolver.gotpl @@ -7,8 +7,8 @@ {{ reserveImport "errors" }} {{ reserveImport "bytes" }} -{{ reserveImport "github.com/vektah/gqlparser" }} -{{ reserveImport "github.com/vektah/gqlparser/ast" }} +{{ reserveImport "github.com/vektah/gqlparser/v2" }} +{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }} {{ reserveImport "github.com/99designs/gqlgen/graphql" }} {{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }} diff --git a/plugin/stubgen/stubs.gotpl b/plugin/stubgen/stubs.gotpl index 63df84767ce..6b4291e4e90 100644 --- a/plugin/stubgen/stubs.gotpl +++ b/plugin/stubgen/stubs.gotpl @@ -7,8 +7,8 @@ {{ reserveImport "errors" }} {{ reserveImport "bytes" }} -{{ reserveImport "github.com/vektah/gqlparser" }} -{{ reserveImport "github.com/vektah/gqlparser/ast" }} +{{ reserveImport "github.com/vektah/gqlparser/v2" }} +{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }} {{ reserveImport "github.com/99designs/gqlgen/graphql" }} {{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }}