@graphql-mesh/plugin-newrelic 0.103.20 → 0.103.21
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 +2 -2
- package/esm/index.js +3 -3
- package/package.json +4 -3
package/cjs/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const newrelic_2 = require("@envelop/newrelic");
|
|
|
11
11
|
const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
|
|
12
12
|
const string_interpolation_1 = require("@graphql-mesh/string-interpolation");
|
|
13
13
|
const utils_1 = require("@graphql-mesh/utils");
|
|
14
|
+
const promise_helpers_1 = require("@whatwg-node/promise-helpers");
|
|
14
15
|
const DESTS = attribute_filter_js_1.default.DESTINATIONS;
|
|
15
16
|
const EnvelopAttributeName = 'Envelop_NewRelic_Plugin';
|
|
16
17
|
function isPromise(value) {
|
|
@@ -75,8 +76,7 @@ function useMeshNewrelic(options, { instrumentationApi = newrelic_1.default?.shi
|
|
|
75
76
|
currentSegment.addAttribute(key, headerValue);
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
return (0, utils_1.mapMaybePromise)(res$, res => {
|
|
79
|
+
return (0, promise_helpers_1.handleMaybePromise)(() => requestHandler(...args), res => {
|
|
80
80
|
sendResAttributes(res);
|
|
81
81
|
return res;
|
|
82
82
|
});
|
package/esm/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import cat from 'newrelic/lib/util/cat.js';
|
|
|
6
6
|
import { useNewRelic } from '@envelop/newrelic';
|
|
7
7
|
import { process } from '@graphql-mesh/cross-helpers';
|
|
8
8
|
import { stringInterpolator } from '@graphql-mesh/string-interpolation';
|
|
9
|
-
import { getHeadersObj
|
|
9
|
+
import { getHeadersObj } from '@graphql-mesh/utils';
|
|
10
|
+
import { handleMaybePromise } from '@whatwg-node/promise-helpers';
|
|
10
11
|
const DESTS = attributeFilter.DESTINATIONS;
|
|
11
12
|
const EnvelopAttributeName = 'Envelop_NewRelic_Plugin';
|
|
12
13
|
function isPromise(value) {
|
|
@@ -71,8 +72,7 @@ export default function useMeshNewrelic(options, { instrumentationApi = newRelic
|
|
|
71
72
|
currentSegment.addAttribute(key, headerValue);
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
return mapMaybePromise(res$, res => {
|
|
75
|
+
return handleMaybePromise(() => requestHandler(...args), res => {
|
|
76
76
|
sendResAttributes(res);
|
|
77
77
|
return res;
|
|
78
78
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/plugin-newrelic",
|
|
3
|
-
"version": "0.103.
|
|
3
|
+
"version": "0.103.21",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"@envelop/newrelic": "^8.0.0",
|
|
12
12
|
"@graphql-mesh/cross-helpers": "^0.4.10",
|
|
13
13
|
"@graphql-mesh/string-interpolation": "^0.5.8",
|
|
14
|
-
"@graphql-mesh/types": "^0.103.
|
|
15
|
-
"@graphql-mesh/utils": "^0.103.
|
|
14
|
+
"@graphql-mesh/types": "^0.103.20",
|
|
15
|
+
"@graphql-mesh/utils": "^0.103.20",
|
|
16
|
+
"@whatwg-node/promise-helpers": "^1.0.0",
|
|
16
17
|
"graphql-yoga": "^5.12.0",
|
|
17
18
|
"tslib": "^2.4.0"
|
|
18
19
|
},
|