@@ -478,6 +478,7 @@ _UnsafeRestQuery.prototype.replaceInQuery = async function () {
478
478
className : inQueryValue . className ,
479
479
restWhere : inQueryValue . where ,
480
480
restOptions : additionalOptions ,
481
+ context : this . context ,
481
482
} ) ;
482
483
return subquery . execute ( ) . then ( response => {
483
484
transformInQuery ( inQueryObject , subquery . className , response . results ) ;
@@ -537,6 +538,7 @@ _UnsafeRestQuery.prototype.replaceNotInQuery = async function () {
537
538
className : notInQueryValue . className ,
538
539
restWhere : notInQueryValue . where ,
539
540
restOptions : additionalOptions ,
541
+ context : this . context ,
540
542
} ) ;
541
543
542
544
return subquery . execute ( ) . then ( response => {
@@ -609,6 +611,7 @@ _UnsafeRestQuery.prototype.replaceSelect = async function () {
609
611
className : selectValue . query . className ,
610
612
restWhere : selectValue . query . where ,
611
613
restOptions : additionalOptions ,
614
+ context : this . context ,
612
615
} ) ;
613
616
614
617
return subquery . execute ( ) . then ( response => {
@@ -671,6 +674,7 @@ _UnsafeRestQuery.prototype.replaceDontSelect = async function () {
671
674
className : dontSelectValue . query . className ,
672
675
restWhere : dontSelectValue . query . where ,
673
676
restOptions : additionalOptions ,
677
+ context : this . context ,
674
678
} ) ;
675
679
676
680
return subquery . execute ( ) . then ( response => {
@@ -860,6 +864,7 @@ _UnsafeRestQuery.prototype.handleInclude = function () {
860
864
this . auth ,
861
865
this . response ,
862
866
this . include [ 0 ] ,
867
+ this . context ,
863
868
this . restOptions
864
869
) ;
865
870
if ( pathResponse . then ) {
@@ -946,7 +951,7 @@ _UnsafeRestQuery.prototype.handleAuthAdapters = async function () {
946
951
// Adds included values to the response.
947
952
// Path is a list of field names.
948
953
// Returns a promise for an augmented response.
949
- function includePath ( config , auth , response , path , restOptions = { } ) {
954
+ function includePath ( config , auth , response , path , context , restOptions = { } ) {
950
955
var pointers = findPointers ( response . results , path ) ;
951
956
if ( pointers . length == 0 ) {
952
957
return response ;
@@ -1026,6 +1031,7 @@ function includePath(config, auth, response, path, restOptions = {}) {
1026
1031
className,
1027
1032
restWhere : where ,
1028
1033
restOptions : includeRestOptions ,
1034
+ context : context ,
1029
1035
} ) ;
1030
1036
return query . execute ( { op : 'get' } ) . then ( results => {
1031
1037
results . className = className ;
0 commit comments