FQL queries are constructed in JS as objects. How can I print one of these objects as a string query, for debugging purposes? For example:
q.Get(q.Ref(q.Collection("Patterns"), req.params.id))
I want to know the FQL string this makes, such as:
Get(Ref(Collection("Patterns"), "300223720476116480"))
You can use the toFQL
method for the Expr
class.
const expr = q.Get(q.Ref(q.Collection("Patterns"), "1234"))
console.log(expr.toFQL())