LiveQueryClientfor such scenarios.
applicationId(required): it's the
applicationIdof your Moralis Dapp.
serverURL(required): it's the URL of your LiveQuery server.
LiveQueryClientwill try to send a connect request to the LiveQuery server.
query(required): it is the
MoralisQueryyou'll want to subscribe.
sessionToken: If you provide the
sessionToken, the LiveQuery server will only send updates to clients whose sessionToken is fit for the
MoralisObjects ACL. You can check the LiveQuery protocol here for more details.
subscription(required): It's the subscription you want to unsubscribe from.
LiveQueryClient, cancel the auto-reconnect, and unsubscribe all subscriptions based on it.
client.close(), we'll cancel the auto-reconnect.
sessionTokento the LiveQuery server when you subscribe to a
MoralisQuery. For the standard API, we use the
sessionTokenof the current user by default. For the advanced API, you can use any
sessionTokenwhen you subscribe to a
MoralisQuery. An important thing to be aware of is when you log out or the
sessionTokenyou are using is invalid, you should unsubscribe from the subscription and subscribe to the
MoralisQueryagain. Otherwise, you may face a security issue since you'll get events that shouldn't be sent to you.