-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
Issue Description
Parse LiveQuery specifications are supposed to take a fields in the query. Parse server does not handle these fields, nor do the iOS and Android clients.
{
"op": "subscribe",
"requestId": 1,
"query": {
"className": "Player",
"where": {"name": "test"},
"fields": ["name"] // Optional
},
"sessionToken": "" // Optional
}
parse-community/ParseLiveQuery-Android#18
Steps to reproduce
Create a Parse Query with fields:
@ParseClassName("Message")
public class Message extends ParseObject {
public static final String USER_ID_KEY = "userId";
public static final String BODY_KEY = "body";
public String getUserId() {
return getString(USER_ID_KEY);
}
public String getBody() {
return getString(BODY_KEY);
}
public void setUserId(String userId) {
put(USER_ID_KEY, userId);
}
public void setBody(String body) {
put(BODY_KEY, body);
}
}
ParseLiveQueryClient<Message> parseLiveQueryClient =
ParseLiveQueryClient.Factory.getClient(new URI(ChatApplication.wsURI));
ParseQuery<Message> parseQuery = ParseQuery.getQuery(Message.class);
parseQuery.selectKeys(["userId"]);
SubscriptionHandling<Message> subscriptionHandling = parseLiveQueryClient.subscribe(parseQuery);
subscriptionHandling.handleEvents(
new SubscriptionHandling.HandleEventsCallback<Message>() {
@Override
public void onEvents(ParseQuery<Message> query,
SubscriptionHandling.Event event,
Message object)
{
}
}Expected Results
Expect only fields to come out.
Actual Outcome
All fields are returned.
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.3.7
- Operating System: MacOS
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost, Heroku
-
Database
- MongoDB version: 3.2.1
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
felipemartim, fridays and dv336699
Metadata
Metadata
Assignees
Labels
No labels