apollo-server-plugin-base
Advanced tools
Comparing version 0.1.0-register.2195 to 0.1.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
6105
60
0