What type of queries does and doesn't work for live queries?

I cant find any documentation of what types of queries doesn’t work when used as live queries. My experience is also that I won’t get any kind of error when I unintentionally create a query that will not work as expected when used as a live query.

Here is an example:

export async function subscribeToMessagesFromChats(chats, includeOwnMessages){
  const query = new parse.Query('ChatMessage');
  
  if(!includeOwnMessages){
    console.log('subscription to msgs without my own messages');
    const user = parse.User.current();
    query.notEqualTo('author', user);
  }

  query.containedIn('chat', chats);

  return query.subscribe();
}

This subscription will trigger for all messages. Even the ones that has the logged in user as ‘author’. Why?

Grateful for any help!

Sorry for posting this question. Just now realized I posted an almost identical question some time ago. The first part of the question still stands though. How can one know what kind of queries are supported as live queries?

I think it should be more clear in the docs, but you can find a reference at this link:

  • The query.where field is mandatory. It represents the condition of the ParseQuery the client subscribes to. The format of the where field is the same with ParseQuery's REST API format. You can check the detail here. Right now we support $lt, $lte, $gt, $gte, $ne, $in, $nin, $exists, $all, $regex, $nearSphere, $within and normal equal condition. Any unsupported conditions will be ignored.

So your code should work. If you can share a simple code reproducing the problem or even better open a failing test case to the repo, we can help to figure it out.

I’d be willing to have a go at creating a failing test. Haven’t created a test before, what would be the procedure?
From reading a bit in the contribution guide I guess this would involve some kind of “integration test”?

You can use this test as a reference, create a failing one in he same file, and open a PR.