diff --git a/_examples/go.mod b/_examples/go.mod index b6973d4fd61..cd7d463d2b8 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -12,7 +12,7 @@ require ( github.com/rs/cors v1.8.0 github.com/stretchr/testify v1.7.0 github.com/vektah/dataloaden v0.3.0 - github.com/vektah/gqlparser/v2 v2.4.0 + github.com/vektah/gqlparser/v2 v2.4.2 sourcegraph.com/sourcegraph/appdash v0.0.0-20210831040556-ec77a7fbcadc ) diff --git a/_examples/go.sum b/_examples/go.sum index 9b876d86a48..24730e5687e 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,7 +1,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM= -github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= 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= @@ -86,8 +86,8 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/vektah/dataloaden v0.3.0 h1:ZfVN2QD6swgvp+tDqdH/OIT/wu3Dhu0cus0k5gIZS84= github.com/vektah/dataloaden v0.3.0/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser/v2 v2.4.0 h1:EmA4dw9mqHm0j6Xzb9T21hOrp3oXmxnS40vwki70DZU= -github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.4.2 h1:29TGc6QmhEUq5fll+2FPoTmhUhR65WEKN4VK/jo0OlM= +github.com/vektah/gqlparser/v2 v2.4.2/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/codegen/testserver/singlefile/directive_test.go b/codegen/testserver/singlefile/directive_test.go index 69f9bab337d..0b7cb97df82 100644 --- a/codegen/testserver/singlefile/directive_test.go +++ b/codegen/testserver/singlefile/directive_test.go @@ -350,7 +350,7 @@ func TestDirectives(t *testing.T) { err := c.Post(`query { directiveInputNullable(arg: {text:"23",inner:{message:"1"}}) }`, &resp) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, "Ok", *resp.DirectiveInputNullable) }) t.Run("when function inner nullable success", func(t *testing.T) { @@ -360,7 +360,7 @@ func TestDirectives(t *testing.T) { err := c.Post(`query { directiveInputNullable(arg: {text:"23",nullableText:"23",inner:{message:"1"},innerNullable:{message:"success"}}) }`, &resp) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, "Ok", *resp.DirectiveInputNullable) }) t.Run("when arg has directive", func(t *testing.T) { @@ -370,7 +370,7 @@ func TestDirectives(t *testing.T) { err := c.Post(`query { directiveInputType(arg: {id: 1}) }`, &resp) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, "Ok", *resp.DirectiveInputType) }) }) @@ -386,7 +386,7 @@ func TestDirectives(t *testing.T) { err := c.Post(`query { directiveObject{ text nullableText order} }`, &resp) - require.Nil(t, err) + require.NoError(t, err) require.Equal(t, "Ok", resp.DirectiveObject.Text) require.True(t, resp.DirectiveObject.NullableText == nil) require.Equal(t, "Query_field", resp.DirectiveObject.Order[0]) @@ -403,7 +403,7 @@ func TestDirectives(t *testing.T) { err := c.Post(`query { directiveObjectWithCustomGoModel{ nullableText } }`, &resp) - require.Nil(t, err) + require.NoError(t, err) require.True(t, resp.DirectiveObjectWithCustomGoModel.NullableText == nil) }) }) @@ -437,7 +437,8 @@ func TestDirectives(t *testing.T) { err := c.WebsocketOnce(`subscription { directiveNullableArg }`, &resp) - require.Nil(t, err) + require.NoError(t, err) + require.NotNil(t, resp.DirectiveNullableArg) require.Equal(t, "Ok", *resp.DirectiveNullableArg) }) t.Run("when function success on valid nullable arg directives", func(t *testing.T) { @@ -447,7 +448,8 @@ func TestDirectives(t *testing.T) { err := c.WebsocketOnce(`subscription { directiveNullableArg(arg: 1) }`, &resp) - require.Nil(t, err) + require.NoError(t, err) + require.NotNil(t, resp.DirectiveNullableArg) require.Equal(t, "Ok", *resp.DirectiveNullableArg) }) t.Run("when function success", func(t *testing.T) { @@ -457,7 +459,8 @@ func TestDirectives(t *testing.T) { err := c.WebsocketOnce(`subscription { directiveArg(arg: "test") }`, &resp) - require.Nil(t, err) + require.NoError(t, err) + require.NotNil(t, resp.DirectiveArg) require.Equal(t, "Ok", *resp.DirectiveArg) }) }) diff --git a/go.mod b/go.mod index 1c00f90c9df..599f5f8eea1 100644 --- a/go.mod +++ b/go.mod @@ -13,12 +13,12 @@ require ( github.com/mitchellh/mapstructure v1.2.3 github.com/stretchr/testify v1.4.0 github.com/urfave/cli/v2 v2.3.0 - github.com/vektah/gqlparser/v2 v2.4.0 + github.com/vektah/gqlparser/v2 v2.4.2 golang.org/x/tools v0.1.9 gopkg.in/yaml.v2 v2.2.8 ) require ( - github.com/agnivade/levenshtein v1.1.0 // indirect + github.com/agnivade/levenshtein v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect ) diff --git a/go.sum b/go.sum index e1dc912c57b..c871345c2e4 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM= -github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= +github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= 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= @@ -49,8 +49,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/vektah/gqlparser/v2 v2.4.0 h1:EmA4dw9mqHm0j6Xzb9T21hOrp3oXmxnS40vwki70DZU= -github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.4.2 h1:29TGc6QmhEUq5fll+2FPoTmhUhR65WEKN4VK/jo0OlM= +github.com/vektah/gqlparser/v2 v2.4.2/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=