@graphql-mesh/transform-encapsulate 0.95.2 → 0.95.3-alpha-20230901124712-8670dde83

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/cjs/index.js CHANGED
@@ -27,9 +27,11 @@ class EncapsulateTransform {
27
27
  const applyTo = { ...DEFAULT_APPLY_TO, ...(this.config?.applyTo || {}) };
28
28
  const outerTypeNames = (0, utils_2.getRootTypeMap)(originalWrappingSchema);
29
29
  for (const operationType in applyTo) {
30
- const outerTypeName = outerTypeNames.get(operationType)?.name;
31
- if (outerTypeName) {
32
- this.transformMap[outerTypeName] = new wrap_1.WrapType(outerTypeName, `${this.name}${OPERATION_TYPE_SUFFIX_MAP[operationType]}`, this.name);
30
+ if (applyTo[operationType] === true) {
31
+ const outerTypeName = outerTypeNames.get(operationType)?.name;
32
+ if (outerTypeName) {
33
+ this.transformMap[outerTypeName] = new wrap_1.WrapType(outerTypeName, `${this.name}${OPERATION_TYPE_SUFFIX_MAP[operationType]}`, this.name);
34
+ }
33
35
  }
34
36
  }
35
37
  for (const typeName of Object.keys(this.transformMap)) {
package/esm/index.js CHANGED
@@ -25,9 +25,11 @@ export default class EncapsulateTransform {
25
25
  const applyTo = { ...DEFAULT_APPLY_TO, ...(this.config?.applyTo || {}) };
26
26
  const outerTypeNames = getRootTypeMap(originalWrappingSchema);
27
27
  for (const operationType in applyTo) {
28
- const outerTypeName = outerTypeNames.get(operationType)?.name;
29
- if (outerTypeName) {
30
- this.transformMap[outerTypeName] = new WrapType(outerTypeName, `${this.name}${OPERATION_TYPE_SUFFIX_MAP[operationType]}`, this.name);
28
+ if (applyTo[operationType] === true) {
29
+ const outerTypeName = outerTypeNames.get(operationType)?.name;
30
+ if (outerTypeName) {
31
+ this.transformMap[outerTypeName] = new WrapType(outerTypeName, `${this.name}${OPERATION_TYPE_SUFFIX_MAP[operationType]}`, this.name);
32
+ }
31
33
  }
32
34
  }
33
35
  for (const typeName of Object.keys(this.transformMap)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/transform-encapsulate",
3
- "version": "0.95.2",
3
+ "version": "0.95.3-alpha-20230901124712-8670dde83",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@graphql-mesh/types": "^0.95.2",