-
-
Notifications
You must be signed in to change notification settings - Fork 206
Livequery not working #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @jiya1 Can you post your app code for me to rate? Is the server configured for Livequery in the "post" class? The code below is an example and is working: QueryBuilder<ParseObject> query =
QueryBuilder<ParseObject>(ParseObject('TestAPI'))
..whereEqualTo('intNumber', 1);
//LiveQuery liveQuery = LiveQuery();
await liveQuery.subscribe(query);
liveQuery.on(LiveQueryEvent.update, (value) {
print('*** UPDATE ***: ${DateTime.now().toString()}\n $value');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
});
liveQuery.on(LiveQueryEvent.delete, (value) {
print('*** DELETE ***: ${DateTime.now().toString()}\n $value');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
});
liveQuery.on(LiveQueryEvent.create, (value) {
print('*** CREATE ***: ${DateTime.now().toString()}\n $value ');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
});
liveQuery.on(LiveQueryEvent.leave, (value) {
print('*** LEAVE ***: ${DateTime.now().toString()}\n $value ');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
});
liveQuery.on(LiveQueryEvent.enter, (value) {
print('*** LEAVE ***: ${DateTime.now().toString()}\n $value ');
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
});
liveQuery.on(LiveQueryEvent.error, (value) {
print('*** ERROR ***: ${DateTime.now().toString()}\n $value ');
if (value is ParseObject) {
print((value as ParseObject).objectId);
print((value as ParseObject).updatedAt);
print((value as ParseObject).createdAt);
print((value as ParseObject).get('objectId'));
print((value as ParseObject).get('updatedAt'));
print((value as ParseObject).get('createdAt'));
}
}); |
hello @RodrigoSMarques
} |
Sorry .. it was an issue from the server side .. |
It dosn't work. It will bring me this error: in the parse_live_query.dart file, it seems the object was not exist. |
Hello ,
livequery not working, the subscription events returns null;
I/flutter (32224): LiveQuery: : Socket opened
I/flutter (32224): LiveQuery: : ConnectMessage: {op: connect, applicationId: **********, clientKey: }
I/flutter (32224): LiveQuery: : SubscribeMessage: {op: subscribe, requestId: 1, query: {className: posts, where: {name: test}}}
I/flutter (32224): Closure: (dynamic) => Null
I/flutter (32224): LiveQuery: : Listen: {"op":"connected","clientId":"bd62e6c5-615f-4156-8e63-ebf17b1a199e"}
I/flutter (32224): {delete: Closure: (dynamic) => Null}
I/flutter (32224): LiveQuery: : Listen: {"op":"subscribed","clientId":"bd62e6c5-615f-4156-8e63-ebf17b1a199e","requestId":1}
I/flutter (32224): {delete: Closure: (dynamic) => Null}
Thanks in advance
The text was updated successfully, but these errors were encountered: