Fix for bug blocking anon queries

This commit is contained in:
Vikram Rangnekar
2020-03-21 20:11:04 -04:00
parent 7a450b16ba
commit 01e488b69d
2 changed files with 4 additions and 6 deletions

View File

@ -222,6 +222,10 @@ func (c *compilerContext) renderDelete(qc *qcode.QCode, w io.Writer,
quoted(c.w, ti.Name)
io.WriteString(c.w, ` WHERE `)
if root.Where == nil {
return 0, errors.New("'where' clause missing in delete mutation")
}
if err := c.renderWhere(root, ti); err != nil {
return 0, err
}