@graphql-yoga/plugin-apollo-inline-trace 2.0.3 → 2.0.4-alpha-20230810153432-d9f7d423
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 +3 -4
- package/esm/index.js +3 -4
- package/package.json +4 -4
package/cjs/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useApolloInlineTrace = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const apollo_reporting_protobuf_1 = tslib_1.__importDefault(require("apollo-reporting-protobuf"));
|
|
5
6
|
const graphql_1 = require("graphql");
|
|
7
|
+
const graphql_yoga_1 = require("graphql-yoga");
|
|
6
8
|
const on_resolve_1 = require("@envelop/on-resolve");
|
|
7
9
|
const fetch_1 = require("@whatwg-node/fetch");
|
|
8
|
-
const apollo_reporting_protobuf_1 = tslib_1.__importDefault(require("apollo-reporting-protobuf"));
|
|
9
|
-
const graphql_yoga_1 = require("graphql-yoga");
|
|
10
10
|
const asArray = (x) => (Array.isArray(x) ? x : [x]);
|
|
11
11
|
/**
|
|
12
12
|
* Produces Apollo's base64 trace protocol containing timing, resolution and
|
|
@@ -35,8 +35,7 @@ function useApolloInlineTrace(options = {}) {
|
|
|
35
35
|
node.type = info.returnType.toString();
|
|
36
36
|
node.parentType = info.parentType.toString();
|
|
37
37
|
node.startTime = hrTimeToDurationInNanos(process.hrtime(ctx.startHrTime));
|
|
38
|
-
if (typeof info.path.key === 'string' &&
|
|
39
|
-
info.path.key !== info.fieldName) {
|
|
38
|
+
if (typeof info.path.key === 'string' && info.path.key !== info.fieldName) {
|
|
40
39
|
// field was aliased, send the original field name too
|
|
41
40
|
node.originalFieldName = info.fieldName;
|
|
42
41
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import ApolloReportingProtobuf from 'apollo-reporting-protobuf';
|
|
1
2
|
import { GraphQLError } from 'graphql';
|
|
3
|
+
import { createGraphQLError, isAsyncIterable } from 'graphql-yoga';
|
|
2
4
|
import { useOnResolve } from '@envelop/on-resolve';
|
|
3
5
|
import { btoa } from '@whatwg-node/fetch';
|
|
4
|
-
import ApolloReportingProtobuf from 'apollo-reporting-protobuf';
|
|
5
|
-
import { createGraphQLError, isAsyncIterable, } from 'graphql-yoga';
|
|
6
6
|
const asArray = (x) => (Array.isArray(x) ? x : [x]);
|
|
7
7
|
/**
|
|
8
8
|
* Produces Apollo's base64 trace protocol containing timing, resolution and
|
|
@@ -31,8 +31,7 @@ export function useApolloInlineTrace(options = {}) {
|
|
|
31
31
|
node.type = info.returnType.toString();
|
|
32
32
|
node.parentType = info.parentType.toString();
|
|
33
33
|
node.startTime = hrTimeToDurationInNanos(process.hrtime(ctx.startHrTime));
|
|
34
|
-
if (typeof info.path.key === 'string' &&
|
|
35
|
-
info.path.key !== info.fieldName) {
|
|
34
|
+
if (typeof info.path.key === 'string' && info.path.key !== info.fieldName) {
|
|
36
35
|
// field was aliased, send the original field name too
|
|
37
36
|
node.originalFieldName = info.fieldName;
|
|
38
37
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-yoga/plugin-apollo-inline-trace",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4-alpha-20230810153432-d9f7d423",
|
|
4
4
|
"description": "Apollo's federated tracing plugin for GraphQL Yoga.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@whatwg-node/fetch": "^0.9.7",
|
|
7
6
|
"@graphql-tools/utils": "^10.0.0",
|
|
8
|
-
"
|
|
9
|
-
"graphql": "^15.2.0 || ^16.0.0"
|
|
7
|
+
"@whatwg-node/fetch": "^0.9.7",
|
|
8
|
+
"graphql": "^15.2.0 || ^16.0.0",
|
|
9
|
+
"graphql-yoga": "4.0.4-alpha-20230810153432-d9f7d423"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@envelop/on-resolve": "^3.0.0",
|