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 {
182182 if ( ! query ) {
183183 return ;
184184 }
185- let where = query . toJSON ( ) . where ;
186185 let className = query . className ;
186+ let queryJSON = query . toJSON ( ) ;
187+ let where = queryJSON . where ;
188+ let fields = queryJSON . keys ? queryJSON . keys . split ( ',' ) : undefined ;
187189 let subscribeRequest = {
188190 op : OP_TYPES . SUBSCRIBE ,
189191 requestId : this . requestId ,
190192 query : {
191193 className,
192- where
194+ where,
195+ fields
193196 }
194197 } ;
195198
@@ -271,15 +274,18 @@ class LiveQueryClient extends EventEmitter {
271274 resubscribe ( ) {
272275 this . subscriptions . forEach ( ( subscription , requestId ) => {
273276 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 ;
275280 let className = query . className ;
276281 let sessionToken = subscription . sessionToken ;
277282 let subscribeRequest = {
278283 op : OP_TYPES . SUBSCRIBE ,
279284 requestId,
280285 query : {
281286 className,
282- where
287+ where,
288+ fields
283289 }
284290 } ;
285291
You can’t perform that action at this time.
0 commit comments