I've seen this pop up a few times. If you use dynamic queries, there's no guarantee that you will get anything output, and then NQL will throw a parse error.
Short term the solution is to put guards around dynamic queries, but I think we can do better in NQL Lang, by handling the concept of an empty clause, and removing the whole clause if empty.
Originally reported at https://github.com/TryGhost/GQL/issues/36
See: https://github.com/TryGhost/Ghost/issues/9258 & https://github.com/TryGhost/Casper/issues/382
I've seen this pop up a few times. If you use dynamic queries, there's no guarantee that you will get anything output, and then NQL will throw a parse error.
Short term the solution is to put guards around dynamic queries, but I think we can do better in NQL Lang, by handling the concept of an empty clause, and removing the whole clause if empty.