@graphql-yoga/plugin-apollo-usage-report
Advanced tools
Comparing version 0.1.0-alpha-20240815202356-b651177c to 0.1.0-alpha-20240815203503-d447560b
@@ -57,9 +57,9 @@ "use strict"; | ||
}, | ||
onResultProcess(args) { | ||
onResultProcess({ request, result, serverContext }) { | ||
// TODO: Handle async iterables ? | ||
if ((0, graphql_yoga_1.isAsyncIterable)(args.result)) { | ||
if ((0, graphql_yoga_1.isAsyncIterable)(result)) { | ||
logger.debug('async iterable results not implemented for now'); | ||
return; | ||
} | ||
const reqCtx = ctxForReq.get(args.request); | ||
const reqCtx = ctxForReq.get(request); | ||
if (!reqCtx) { | ||
@@ -82,3 +82,3 @@ logger.debug('operation tracing context not found, this operation will not be traced.'); | ||
const tracesPerQuery = tracesPerSchema[schemaId]; | ||
args.serverContext.waitUntil(sendTrace(options, logger, fetchAPI, schemaId, tracesPerQuery)); | ||
serverContext.waitUntil(sendTrace(options, logger, fetchAPI, schemaId, tracesPerQuery)); | ||
} | ||
@@ -85,0 +85,0 @@ }, |
@@ -53,9 +53,9 @@ import { printSchema, stripIgnoredCharacters } from 'graphql'; | ||
}, | ||
onResultProcess(args) { | ||
onResultProcess({ request, result, serverContext }) { | ||
// TODO: Handle async iterables ? | ||
if (isAsyncIterable(args.result)) { | ||
if (isAsyncIterable(result)) { | ||
logger.debug('async iterable results not implemented for now'); | ||
return; | ||
} | ||
const reqCtx = ctxForReq.get(args.request); | ||
const reqCtx = ctxForReq.get(request); | ||
if (!reqCtx) { | ||
@@ -78,3 +78,3 @@ logger.debug('operation tracing context not found, this operation will not be traced.'); | ||
const tracesPerQuery = tracesPerSchema[schemaId]; | ||
args.serverContext.waitUntil(sendTrace(options, logger, fetchAPI, schemaId, tracesPerQuery)); | ||
serverContext.waitUntil(sendTrace(options, logger, fetchAPI, schemaId, tracesPerQuery)); | ||
} | ||
@@ -81,0 +81,0 @@ }, |
{ | ||
"name": "@graphql-yoga/plugin-apollo-usage-report", | ||
"version": "0.1.0-alpha-20240815202356-b651177c", | ||
"version": "0.1.0-alpha-20240815203503-d447560b", | ||
"description": "Apollo's GraphOS usage report plugin for GraphQL Yoga.", | ||
@@ -9,3 +9,3 @@ "peerDependencies": { | ||
"graphql": "^15.2.0 || ^16.0.0", | ||
"graphql-yoga": "^5.7.0-alpha-20240815202356-b651177c" | ||
"graphql-yoga": "^5.7.0-alpha-20240815203503-d447560b" | ||
}, | ||
@@ -15,3 +15,3 @@ "dependencies": { | ||
"tslib": "^2.5.2", | ||
"@graphql-yoga/plugin-apollo-inline-trace": "^3.7.0-alpha-20240815202356-b651177c" | ||
"@graphql-yoga/plugin-apollo-inline-trace": "^3.7.0-alpha-20240815203503-d447560b" | ||
}, | ||
@@ -18,0 +18,0 @@ "repository": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18329
2