err explicitly if there's no operation name
This commit is contained in:
@@ -116,6 +116,10 @@ func (g *generator) getDocComment(op *ast.OperationDefinition) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *generator) addOperation(op *ast.OperationDefinition) error {
|
func (g *generator) addOperation(op *ast.OperationDefinition) error {
|
||||||
|
if op.Name == "" {
|
||||||
|
return fmt.Errorf("operations must have operation-names")
|
||||||
|
}
|
||||||
|
|
||||||
var builder strings.Builder
|
var builder strings.Builder
|
||||||
f := formatter.NewFormatter(&builder)
|
f := formatter.NewFormatter(&builder)
|
||||||
// TODO: this could even get minifed.
|
// TODO: this could even get minifed.
|
||||||
|
|||||||
Reference in New Issue
Block a user