New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-yoga/plugin-apollo-usage-report

Package Overview
Dependencies
Maintainers
0
Versions
315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-yoga/plugin-apollo-usage-report - npm Package Compare versions

Comparing version 0.5.7-alpha-20250114104343-cf3fb3860993f8ac48b0eff0bfc0e1fbc168324d to 0.5.7-alpha-20250115184000-273903bba880109a878bfecad5d89ba918be5cc2

10

cjs/index.js

@@ -15,3 +15,2 @@ "use strict";

const [instrumentation, ctxForReq] = (0, plugin_apollo_inline_trace_1.useApolloInstrumentation)(options);
let schemaIdSet$;
let schemaId;

@@ -46,11 +45,7 @@ let yoga;

if (schema) {
schemaIdSet$ = hashSHA256((0, graphql_1.printSchema)(schema), yoga.fetchAPI).then(id => {
hashSHA256((0, graphql_1.printSchema)(schema)).then(id => {
schemaId = id;
schemaIdSet$ = undefined;
});
}
},
onRequestParse() {
return schemaIdSet$;
},
onParse() {

@@ -88,4 +83,3 @@ return function onParseEnd({ result, context }) {

if (!trace.schemaId || !trace.operationKey) {
logger.debug('Misformed trace, missing operation key or schema id');
continue;
throw new TypeError('Misformed trace, missing operation key or schema id');
}

@@ -92,0 +86,0 @@ const clientName = clientNameFactory(request);

@@ -11,3 +11,2 @@ import { getOperationAST, Kind, printSchema, stripIgnoredCharacters } from 'graphql';

const [instrumentation, ctxForReq] = useApolloInstrumentation(options);
let schemaIdSet$;
let schemaId;

@@ -42,11 +41,7 @@ let yoga;

if (schema) {
schemaIdSet$ = hashSHA256(printSchema(schema), yoga.fetchAPI).then(id => {
hashSHA256(printSchema(schema)).then(id => {
schemaId = id;
schemaIdSet$ = undefined;
});
}
},
onRequestParse() {
return schemaIdSet$;
},
onParse() {

@@ -84,4 +79,3 @@ return function onParseEnd({ result, context }) {

if (!trace.schemaId || !trace.operationKey) {
logger.debug('Misformed trace, missing operation key or schema id');
continue;
throw new TypeError('Misformed trace, missing operation key or schema id');
}

@@ -88,0 +82,0 @@ const clientName = clientNameFactory(request);

8

package.json
{
"name": "@graphql-yoga/plugin-apollo-usage-report",
"version": "0.5.7-alpha-20250114104343-cf3fb3860993f8ac48b0eff0bfc0e1fbc168324d",
"version": "0.5.7-alpha-20250115184000-273903bba880109a878bfecad5d89ba918be5cc2",
"description": "Apollo's GraphOS usage report plugin for GraphQL Yoga.",
"peerDependencies": {
"graphql": "^15.2.0 || ^16.0.0",
"graphql-yoga": "^5.10.9"
"graphql-yoga": "^5.10.10-alpha-20250115184000-273903bba880109a878bfecad5d89ba918be5cc2"
},
"dependencies": {
"@apollo/usage-reporting-protobuf": "^4.1.1",
"tslib": "^2.5.2",
"@graphql-yoga/plugin-apollo-inline-trace": "^3.10.9"
"tslib": "^2.8.1",
"@graphql-yoga/plugin-apollo-inline-trace": "^3.10.10-alpha-20250115184000-273903bba880109a878bfecad5d89ba918be5cc2"
},

@@ -14,0 +14,0 @@ "repository": {

@@ -1,2 +0,2 @@

import { type Maybe, type Plugin, type YogaInitialContext } from 'graphql-yoga';
import { Maybe, Plugin, YogaInitialContext } from 'graphql-yoga';
import { ApolloInlineGraphqlTraceContext, ApolloInlineRequestTraceContext, ApolloInlineTracePluginOptions } from '@graphql-yoga/plugin-apollo-inline-trace';

@@ -3,0 +3,0 @@ type ApolloUsageReportOptions = ApolloInlineTracePluginOptions & {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc