@graphql-tools/utils 7.1.3 → 7.1.6

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.
@@ -1,7 +1,7 @@
1
1
  export interface Observer<T> {
2
- next?: (value: T) => void;
3
- error?: (error: Error) => void;
4
- complete?: () => void;
2
+ next: (value: T) => void;
3
+ error: (error: Error) => void;
4
+ complete: () => void;
5
5
  }
6
6
  export interface Observable<T> {
7
7
  subscribe(observer: Observer<T>): {
package/es5/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils/es5",
3
- "version": "7.1.3",
3
+ "version": "7.1.6",
4
4
  "description": "Common package containting utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -11,7 +11,11 @@
11
11
  "camel-case": "4.1.2",
12
12
  "tslib": "~2.0.1"
13
13
  },
14
- "repository": "git@github.com:ardatan/graphql-tools.git",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "ardatan/graphql-tools",
17
+ "directory": "packages/utils"
18
+ },
15
19
  "author": "Dotan Simha <dotansimha@gmail.com>",
16
20
  "license": "MIT",
17
21
  "main": "index.cjs.js",
package/index.cjs.js CHANGED
@@ -2446,7 +2446,7 @@ visitorOrVisitorSelector) {
2446
2446
  // with an .objectType property referring to the parent.
2447
2447
  objectType: type,
2448
2448
  });
2449
- if (newField.args != null) {
2449
+ if ((newField === null || newField === void 0 ? void 0 : newField.args) != null) {
2450
2450
  newField.args = newField.args
2451
2451
  .map(arg => callMethod('visitArgumentDefinition', arg, {
2452
2452
  // Like visitFieldDefinition, visitArgumentDefinition takes a
@@ -3561,6 +3561,7 @@ function observableToAsyncIterable(observable) {
3561
3561
  error(err) {
3562
3562
  pushError(err);
3563
3563
  },
3564
+ complete() { },
3564
3565
  });
3565
3566
  const emptyQueue = () => {
3566
3567
  if (listening) {
@@ -3812,7 +3813,7 @@ function valueMatchesCriteria(value, criteria) {
3812
3813
  }
3813
3814
 
3814
3815
  function isAsyncIterable(value) {
3815
- return Symbol.asyncIterator in value;
3816
+ return typeof value === 'object' && value != null && Symbol.asyncIterator in value;
3816
3817
  }
3817
3818
 
3818
3819
  function isDocumentNode(object) {