@envelop/statsd 0.1.0 → 0.2.0-alpha-ed2d5ef.0
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/index.js +10 -1
- package/index.mjs +10 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -11,9 +11,18 @@ const graphql = require('graphql');
|
|
|
11
11
|
* Source: https://github.com/graphql/graphql-js/blob/main/src/jsutils/isAsyncIterable.ts
|
|
12
12
|
*/
|
|
13
13
|
function isAsyncIterable(maybeAsyncIterable) {
|
|
14
|
-
return
|
|
14
|
+
return (maybeAsyncIterable != null &&
|
|
15
|
+
typeof maybeAsyncIterable === 'object' &&
|
|
16
|
+
typeof maybeAsyncIterable[Symbol.asyncIterator] === 'function');
|
|
15
17
|
}
|
|
16
18
|
|
|
19
|
+
/**
|
|
20
|
+
* This enum is used only internally in order to create nominal type for the disabled plugin
|
|
21
|
+
*/
|
|
22
|
+
var EnableIfBranded;
|
|
23
|
+
(function (EnableIfBranded) {
|
|
24
|
+
EnableIfBranded[EnableIfBranded["DisabledPlugin"] = 0] = "DisabledPlugin";
|
|
25
|
+
})(EnableIfBranded || (EnableIfBranded = {}));
|
|
17
26
|
function isIntrospectionOperationString(operation) {
|
|
18
27
|
return (typeof operation === 'string' ? operation : operation.body).indexOf('__schema') !== -1;
|
|
19
28
|
}
|
package/index.mjs
CHANGED
|
@@ -7,9 +7,18 @@ import { Kind } from 'graphql';
|
|
|
7
7
|
* Source: https://github.com/graphql/graphql-js/blob/main/src/jsutils/isAsyncIterable.ts
|
|
8
8
|
*/
|
|
9
9
|
function isAsyncIterable(maybeAsyncIterable) {
|
|
10
|
-
return
|
|
10
|
+
return (maybeAsyncIterable != null &&
|
|
11
|
+
typeof maybeAsyncIterable === 'object' &&
|
|
12
|
+
typeof maybeAsyncIterable[Symbol.asyncIterator] === 'function');
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
/**
|
|
16
|
+
* This enum is used only internally in order to create nominal type for the disabled plugin
|
|
17
|
+
*/
|
|
18
|
+
var EnableIfBranded;
|
|
19
|
+
(function (EnableIfBranded) {
|
|
20
|
+
EnableIfBranded[EnableIfBranded["DisabledPlugin"] = 0] = "DisabledPlugin";
|
|
21
|
+
})(EnableIfBranded || (EnableIfBranded = {}));
|
|
13
22
|
function isIntrospectionOperationString(operation) {
|
|
14
23
|
return (typeof operation === 'string' ? operation : operation.body).indexOf('__schema') !== -1;
|
|
15
24
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/statsd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha-ed2d5ef.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"graphql": "^14.0.0 || ^15.0.0",
|
|
6
|
+
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
7
7
|
"hot-shots": "^8.0.0"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|