Skip to content

orderBy queries in subscribing trigger "Additional properties not supported" by Parse Server #14

Description

@rogerhu

Take this Parse server example:

   // op=subscribe, className=Message, roomName=null, requestId=1, order=createdAt

  ParseQuery<Message> parseQuery = ParseQuery.getQuery(Message.class);
                    parseQuery.whereEqualTo("roomName", "test");
                    parseQuery.orderByAscending("createdAt");

The same query in Swift doesn't cause this issue. The issue is we serialize orderByAscending for ParseQueries, which gets passed along to the subscription request.

    var messagesQuery: PFQuery<Message> {
        return (Message.query()?
                .whereKey("roomName", equalTo: currentChatRoom!.name!)
                .order(byAscending: "createdAt")) as! PFQuery<Message>
    }

There are some issues if you have a ParseQuery that uses order by semantics (see #14).
I think we may need our own Parse encoding/decoding as it's done in the iOS version (https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Internal/QueryEncoder.swift)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions