@graphql-tools/wrap 7.0.6-alpha-1a132cb3.0 → 7.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es5/index.cjs.js +6 -6
- package/es5/index.cjs.js.map +1 -1
- package/es5/index.esm.js +6 -6
- package/es5/index.esm.js.map +1 -1
- package/es5/package.json +5 -5
- package/es5/transforms/TransformQuery.d.ts +4 -4
- package/index.cjs.js +6 -6
- package/index.cjs.js.map +1 -1
- package/index.esm.js +6 -6
- package/index.esm.js.map +1 -1
- package/package.json +5 -5
- package/transforms/TransformQuery.d.ts +4 -4
package/es5/index.esm.js
CHANGED
|
@@ -887,7 +887,7 @@ var TransformQuery = /** @class */ (function () {
|
|
|
887
887
|
this.errorPathTransformer = errorPathTransformer;
|
|
888
888
|
this.fragments = fragments;
|
|
889
889
|
}
|
|
890
|
-
TransformQuery.prototype.transformRequest = function (originalRequest,
|
|
890
|
+
TransformQuery.prototype.transformRequest = function (originalRequest, delegationContext, transformationContext) {
|
|
891
891
|
var _a;
|
|
892
892
|
var _this = this;
|
|
893
893
|
var pathLength = this.path.length;
|
|
@@ -900,7 +900,7 @@ var TransformQuery = /** @class */ (function () {
|
|
|
900
900
|
}
|
|
901
901
|
index++;
|
|
902
902
|
if (index === pathLength) {
|
|
903
|
-
var selectionSet = _this.queryTransformer(node.selectionSet, _this.fragments);
|
|
903
|
+
var selectionSet = _this.queryTransformer(node.selectionSet, _this.fragments, delegationContext, transformationContext);
|
|
904
904
|
return __assign(__assign({}, node), { selectionSet: selectionSet });
|
|
905
905
|
}
|
|
906
906
|
},
|
|
@@ -911,15 +911,15 @@ var TransformQuery = /** @class */ (function () {
|
|
|
911
911
|
_a));
|
|
912
912
|
return __assign(__assign({}, originalRequest), { document: document });
|
|
913
913
|
};
|
|
914
|
-
TransformQuery.prototype.transformResult = function (originalResult,
|
|
915
|
-
var data = this.transformData(originalResult.data);
|
|
914
|
+
TransformQuery.prototype.transformResult = function (originalResult, delegationContext, transformationContext) {
|
|
915
|
+
var data = this.transformData(originalResult.data, delegationContext, transformationContext);
|
|
916
916
|
var errors = originalResult.errors;
|
|
917
917
|
return {
|
|
918
918
|
data: data,
|
|
919
919
|
errors: errors != null ? this.transformErrors(errors) : undefined,
|
|
920
920
|
};
|
|
921
921
|
};
|
|
922
|
-
TransformQuery.prototype.transformData = function (data) {
|
|
922
|
+
TransformQuery.prototype.transformData = function (data, delegationContext, transformationContext) {
|
|
923
923
|
var leafIndex = this.path.length - 1;
|
|
924
924
|
var index = 0;
|
|
925
925
|
var newData = data;
|
|
@@ -935,7 +935,7 @@ var TransformQuery = /** @class */ (function () {
|
|
|
935
935
|
index++;
|
|
936
936
|
next = this.path[index];
|
|
937
937
|
}
|
|
938
|
-
newData[next] = this.resultTransformer(newData[next]);
|
|
938
|
+
newData[next] = this.resultTransformer(newData[next], delegationContext, transformationContext);
|
|
939
939
|
}
|
|
940
940
|
return newData;
|
|
941
941
|
};
|