Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anvilco/apollo-server-plugin-introspection-metadata

Package Overview
Dependencies
Maintainers
6
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anvilco/apollo-server-plugin-introspection-metadata - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 2.2.1
- `testFn` can be `async`, but `requestDidStart` cannot be.
### 2.2.0

@@ -2,0 +6,0 @@

14

dist/index.js

@@ -66,5 +66,6 @@ "use strict";

// Check at the beginning of the request whether we should do anything at all
async requestDidStart(context) {
requestDidStart(context) {
const testResult = testFn(context);
// If this request doesn't match what we're looking for (an Introspection Query), then do nothing.
if (!(await testFn(context))) {
if (!testResult) {
return;

@@ -74,3 +75,10 @@ }

// Hook into the response event
willSendResponse(context) {
async willSendResponse(context) {
// Is it a promise? Then we can finally await it here. Can't await it
// in requestDidStart
if (typeof testResult.then === 'function') {
if (!(await testResult)) {
return;
}
}
const {

@@ -77,0 +85,0 @@ response: introspectionQueryResponse

{
"name": "@anvilco/apollo-server-plugin-introspection-metadata",
"version": "2.2.0",
"version": "2.2.1",
"description": "A plugin for Apollo Server that allows for adding metadata to GraphQL Introspection Query responses.",

@@ -53,4 +53,7 @@ "author": "Anvil Foundry Inc. <hello@useanvil.com>",

"nodemon": "^2.0.20",
"rimraf": "^5.0.0"
"rewire": "^6.0.0",
"rimraf": "^5.0.0",
"sinon": "^15.1.0",
"sinon-chai": "^3.7.0"
}
}
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