TryGhost / NQL

MIT License
4 stars 8 forks source link

Support for empty literals, strings and groups #19

Open ErisDS opened 6 years ago

ErisDS commented 6 years ago

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.