Backend update Apr 24th 2019

Listener visibility, query explain mode, and more

Listener events are usually sent as soon as a transaction is committed, but before the change is visible to queries. Listeners can now prefer receiving events after they have been made visible instead, by specifying visibility=query. See the listener API reference for more details.

The query execution plan, useful to advanced users when optimizing slow queries, can now be retrieved by specifying explain=true for queries. This will return the plan as plain text in the explain field of the result. The actual query exection can be skipped by specifying explain=only instead.

We have also been working on lots of infrastructure improvements that lay the foundation for upcoming features and improved scalability - stay tuned.

Other improvements include:

  • GROQ operators such as match are no longer considered reserved keywords, and can be used as attribute names.
  • The GROQ functions now() and identity() were added, and are recommended over the default query parameters $now and $identity which are deprecated.
  • Fixed a GROQ bug where queries that evaluate to a root-level value (e.g. *[_id == "id"][0].authors[].name) sometimes returned null.
  • Fixed various crashes in the GROQ query engine.