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:
Ben Kraft
2022-06-16 16:22:12 -07:00
committed by GitHub
parent e38a212de2
commit 1f44dc6db3
6 changed files with 17 additions and 14 deletions
+2 -9
View File
@@ -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"