Live Query

Live Query allows you to subscribe to a Parse.Query you are interested in. Once subscribed, the server will notify clients whenever a Parse.Object that matches the Parse.Query is created or updated, in real-time.

Suppose you're building a To Do app and multiple users can make edits to the list. Parse.Query would require you to constantly poll the server for status. That's not an ideal situation.

A Live Query solves this and makes it to where the client can subscribe to a Parse.Query and when updates are made, the subscriber will be notified.


Live Query requires you to configure which collections can be subscribed to. There are two ways to configure collections, env.json and live-query-classnames hook.


Open the /src/env.json file and update the LIVE_QUERY_SETTINGS.classNames array with the collection name you wish to include.

    "LIVE_QUERY_SERVER": true,
        "classNames": ["Changelog", "YourCollection"]

If you have multiple env.json files be sure to update them accordingly

live-query-classnames hook

Actinium.Hook.register('live-query-classnames', classNames => {

Using the live-query-classnames hook will execute regardless of your plugin's active status due to the fact that this hook is run before the server starts.

Last updated