Release v0.5.0 (#208)
It feels like just yesterday, but it's been over four months since our last release! So it's as good a time as any; while there are quite a few changes they're individually mostly small. As usual, this updates the changelog, and I'll tag it with the release once it lands. Test plan: no relevant bug reports lately
This commit is contained in:
@@ -22,6 +22,16 @@ When releasing a new version:
|
||||
|
||||
### Breaking changes:
|
||||
|
||||
### New features:
|
||||
|
||||
### Bug fixes:
|
||||
|
||||
## v0.5.0
|
||||
|
||||
Version 0.5.0 adds several new configuration options and convenience features. Note that genqlient now requires Go 1.16 or higher, and is tested through Go 1.18.
|
||||
|
||||
### Breaking changes:
|
||||
|
||||
- genqlient now requires Go 1.16 or higher.
|
||||
- The [`graphql.Client`](https://pkg.go.dev/github.com/Khan/genqlient/graphql#Client) interface now accepts two structs for the request and response, to allow future expansion, rather than several individual arguments. Clients implementing the interface themselves will need to change the signature; clients who simply call `graphql.NewClient` are unaffected.
|
||||
|
||||
|
||||
@@ -228,17 +228,10 @@ func (g *generator) preprocessQueryDocument(doc *ast.QueryDocument) {
|
||||
// considers valid but we don't allow, and returns an error if this operation
|
||||
// is invalid for genqlient's purposes.
|
||||
func (g *generator) validateOperation(op *ast.OperationDefinition) error {
|
||||
opType, err := g.baseTypeForOperation(op.Operation)
|
||||
switch {
|
||||
case err != nil:
|
||||
_, err := g.baseTypeForOperation(op.Operation)
|
||||
if err != nil {
|
||||
// (e.g. operation has subscriptions, which we don't support)
|
||||
return err
|
||||
case opType == nil:
|
||||
// gqlparser should err here, but doesn't [1], so we err to prevent
|
||||
// panics later.
|
||||
// TODO(benkraft): Remove once gqlparser is fixed.
|
||||
// [1] https://github.com/vektah/gqlparser/issues/221
|
||||
return errorf(op.Position, "schema has no %v type", op.Operation)
|
||||
}
|
||||
|
||||
if op.Name == "" {
|
||||
|
||||
@@ -1 +1 @@
|
||||
testdata/errors/NoMutationType.graphql:1: schema has no mutation type
|
||||
testdata/errors/NoMutationType.graphql:1: query-spec does not match schema: Schema does not support operation type "mutation"
|
||||
|
||||
@@ -1 +1 @@
|
||||
testdata/errors/NoQueryType.graphql:1: schema has no query type
|
||||
testdata/errors/NoQueryType.graphql:1: query-spec does not match schema: Schema does not support operation type "query"
|
||||
|
||||
@@ -8,7 +8,7 @@ require (
|
||||
github.com/alexflint/go-arg v1.4.2
|
||||
github.com/bradleyjkemp/cupaloy/v2 v2.6.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/vektah/gqlparser/v2 v2.4.1
|
||||
github.com/vektah/gqlparser/v2 v2.4.5
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
|
||||
golang.org/x/tools v0.1.10
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
|
||||
@@ -55,8 +55,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.4.1 h1:QOyEn8DAPMUMARGMeshKDkDgNmVoEaEGiDB0uWxcSlQ=
|
||||
github.com/vektah/gqlparser/v2 v2.4.1/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5 h1:C02NsyEsL4TXJB7ndonqTfuQOL4XPIu0aAWugdmTgmc=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5/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=
|
||||
|
||||
Reference in New Issue
Block a user