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

apollo-server-plugin-base

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-server-plugin-base - npm Package Compare versions

Comparing version 0.1.0-register.2195 to 0.1.0

19

dist/index.d.ts

@@ -1,11 +0,16 @@

import { GraphQLServiceContext, GraphQLRequestContext } from 'apollo-server-core/dist/requestPipelineAPI';
export { GraphQLServiceContext, GraphQLRequestContext };
export declare abstract class ApolloServerPlugin {
serverWillStart?(service: GraphQLServiceContext): Promise<void>;
import { GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse } from 'apollo-server-core/dist/requestPipelineAPI';
export { GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse, };
declare type ValueOrPromise<T> = T | Promise<T>;
export interface ApolloServerPlugin {
serverWillStart?(service: GraphQLServiceContext): ValueOrPromise<void>;
requestDidStart?<TContext>(requestContext: GraphQLRequestContext<TContext>): GraphQLRequestListener<TContext> | void;
}
export interface GraphQLRequestListener<TContext> {
prepareRequest?(requestContext: GraphQLRequestContext<TContext>): Promise<void>;
executionDidStart?(requestContext: GraphQLRequestContext<TContext>): void;
export declare type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
export interface GraphQLRequestListener<TContext = Record<string, any>> {
parsingDidStart?(requestContext: GraphQLRequestContext<TContext>): (err?: Error) => void | void;
validationDidStart?(requestContext: WithRequired<GraphQLRequestContext<TContext>, 'document'>): (err?: ReadonlyArray<Error>) => void | void;
didResolveOperation?(requestContext: WithRequired<GraphQLRequestContext<TContext>, 'document' | 'operationName' | 'operation'>): ValueOrPromise<void>;
executionDidStart?(requestContext: WithRequired<GraphQLRequestContext<TContext>, 'document' | 'operationName' | 'operation'>): (err?: Error) => void | void;
willSendResponse?(requestContext: WithRequired<GraphQLRequestContext<TContext>, 'response'>): ValueOrPromise<void>;
}
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ApolloServerPlugin {
}
exports.ApolloServerPlugin = ApolloServerPlugin;
//# sourceMappingURL=index.js.map
{
"name": "apollo-server-plugin-base",
"version": "0.1.0-register.2195+e44b5bd",
"version": "0.1.0",
"description": "Apollo Server plugin base classes",

@@ -14,4 +14,4 @@ "main": "dist/index.js",

"devDependencies": {
"apollo-server-core": "2.2.0-register.2195+e44b5bd",
"apollo-server-env": "2.1.0-register.2195+e44b5bd"
"apollo-server-core": "2.2.0",
"apollo-server-env": "2.2.0"
},

@@ -21,3 +21,3 @@ "peerDependencies": {

},
"gitHead": "e44b5bd3c8b602f549ae52c4cb9d9c7e2488a5c1"
"gitHead": "6bd73b175ff628a5e9858e2a5da1aa9dab5ed348"
}
import {
GraphQLServiceContext,
GraphQLRequestContext,
GraphQLRequest,
GraphQLResponse,
} from 'apollo-server-core/dist/requestPipelineAPI';
export {
GraphQLServiceContext,
GraphQLRequestContext,
GraphQLRequest,
GraphQLResponse,
};
export { GraphQLServiceContext, GraphQLRequestContext };
type ValueOrPromise<T> = T | Promise<T>;
export abstract class ApolloServerPlugin {
async serverWillStart?(service: GraphQLServiceContext): Promise<void>;
export interface ApolloServerPlugin {
serverWillStart?(service: GraphQLServiceContext): ValueOrPromise<void>;
requestDidStart?<TContext>(

@@ -15,9 +23,26 @@ requestContext: GraphQLRequestContext<TContext>,

// type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
export interface GraphQLRequestListener<TContext> {
prepareRequest?(
export interface GraphQLRequestListener<TContext = Record<string, any>> {
parsingDidStart?(
requestContext: GraphQLRequestContext<TContext>,
): Promise<void>;
executionDidStart?(requestContext: GraphQLRequestContext<TContext>): void;
): (err?: Error) => void | void;
validationDidStart?(
requestContext: WithRequired<GraphQLRequestContext<TContext>, 'document'>,
): (err?: ReadonlyArray<Error>) => void | void;
didResolveOperation?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'document' | 'operationName' | 'operation'
>,
): ValueOrPromise<void>;
executionDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'document' | 'operationName' | 'operation'
>,
): (err?: Error) => void | void;
willSendResponse?(
requestContext: WithRequired<GraphQLRequestContext<TContext>, 'response'>,
): ValueOrPromise<void>;
}

Sorry, the diff of this file is not supported yet

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