@graphql-tools/utils 9.1.2 → 9.1.3-alpha-20221207144117-2cfdc8a1

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/withCancel.js CHANGED
@@ -41,12 +41,12 @@ function getAsyncIterableWithCancel(asyncIterable, onCancel) {
41
41
  const existingPropValue = Reflect.get(asyncIterable, prop, receiver);
42
42
  if (Symbol.asyncIterator === prop) {
43
43
  return function asyncIteratorFactory() {
44
- const asyncIterator = Reflect.apply(existingPropValue[Symbol.asyncIterator], asyncIterable, []);
44
+ const asyncIterator = Reflect.apply(existingPropValue, asyncIterable, []);
45
45
  return getAsyncIteratorWithCancel(asyncIterator, onCancel);
46
46
  };
47
47
  }
48
48
  else if (typeof existingPropValue === 'function') {
49
- return proxyMethodFactory(asyncIterable, existingPropValue[Symbol.asyncIterator]);
49
+ return proxyMethodFactory(asyncIterable, existingPropValue);
50
50
  }
51
51
  return existingPropValue;
52
52
  },
package/esm/withCancel.js CHANGED
@@ -37,12 +37,12 @@ export function getAsyncIterableWithCancel(asyncIterable, onCancel) {
37
37
  const existingPropValue = Reflect.get(asyncIterable, prop, receiver);
38
38
  if (Symbol.asyncIterator === prop) {
39
39
  return function asyncIteratorFactory() {
40
- const asyncIterator = Reflect.apply(existingPropValue[Symbol.asyncIterator], asyncIterable, []);
40
+ const asyncIterator = Reflect.apply(existingPropValue, asyncIterable, []);
41
41
  return getAsyncIteratorWithCancel(asyncIterator, onCancel);
42
42
  };
43
43
  }
44
44
  else if (typeof existingPropValue === 'function') {
45
- return proxyMethodFactory(asyncIterable, existingPropValue[Symbol.asyncIterator]);
45
+ return proxyMethodFactory(asyncIterable, existingPropValue);
46
46
  }
47
47
  return existingPropValue;
48
48
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils",
3
- "version": "9.1.2",
3
+ "version": "9.1.3-alpha-20221207144117-2cfdc8a1",
4
4
  "description": "Common package containing utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {