-
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
This page describes the NQL Language, originally described in TryGhost/Ghost#5463.
Table of Contents:
The goal of the NQL language is to be a powerful, simple-to-contruct, string-based query format that represents any valid MongoDB query object and works as a valid filter
strategy in the JSONAPI Spec.
The language is designed to work in many contexts:
- HTTP / URI
- Method Call (ES5/ES6)
- Handlebars helper
The main difference between GQL and NQL is that GQL was a combined library that used its own made-up JSON format as a middle ground between the GQL string format and converting to knex.
NQL-Lang is just the NQL language parser, which converts to MongoDB's Query JSON format.
- NQL supports single-char literals
- NQL does NOT support colons at the start of literals
Here is a separate Gist outlining some example queries in HTTP, method call & get helper form: https://gist.github.com/ErisDS/f516a859355d515aa6ad.