[SOLVED] Is it possible to Subscribe to a Relation?

This seems to work in code, but I do not get any events:

const rel = user.relation("Favorites");
const query = rel.query();
const subscription = await query.subscribe();
subscription.on("enter", (sub) => {
        console.log("Enter");
      });

Has anyone had success making this work to observe a query?

Perhaps the docs here can be of help -
https://docs.moralis.io/moralis-server/database/live-queries#subscribe

You can also search on google on how to do it with parse server as Moralis server uses parse server

Haven’t seen this done before

Ok - looks like this is not supported in Parse according to https://tipsfordev.com/livequery-parse-server-subscription-does-not-trigger-events.
Bummer! I guess a more brute force subscription on the whole table will be required, or fallback to storing an Array of IDs on the record which you can subscribe to.