File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -182,14 +182,17 @@ class LiveQueryClient extends EventEmitter {
182
182
if ( ! query ) {
183
183
return ;
184
184
}
185
- let where = query . toJSON ( ) . where ;
186
185
let className = query . className ;
186
+ let queryJSON = query . toJSON ( ) ;
187
+ let where = queryJSON . where ;
188
+ let fields = queryJSON . keys ? queryJSON . keys . split ( ',' ) : undefined ;
187
189
let subscribeRequest = {
188
190
op : OP_TYPES . SUBSCRIBE ,
189
191
requestId : this . requestId ,
190
192
query : {
191
193
className,
192
- where
194
+ where,
195
+ fields
193
196
}
194
197
} ;
195
198
@@ -271,15 +274,18 @@ class LiveQueryClient extends EventEmitter {
271
274
resubscribe ( ) {
272
275
this . subscriptions . forEach ( ( subscription , requestId ) => {
273
276
let query = subscription . query ;
274
- let where = query . toJSON ( ) . where ;
277
+ let queryJSON = query . toJSON ( ) ;
278
+ let where = queryJSON . where ;
279
+ let fields = queryJSON . keys ? queryJSON . keys . split ( ',' ) : undefined ;
275
280
let className = query . className ;
276
281
let sessionToken = subscription . sessionToken ;
277
282
let subscribeRequest = {
278
283
op : OP_TYPES . SUBSCRIBE ,
279
284
requestId,
280
285
query : {
281
286
className,
282
- where
287
+ where,
288
+ fields
283
289
}
284
290
} ;
285
291
You can’t perform that action at this time.
0 commit comments