apollo-server-plugin-base
Advanced tools
Comparing version 3.0.2 to 3.1.0-alpha.0
@@ -1,3 +0,3 @@ | ||
import { AnyFunctionMap, BaseContext, GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse, WithRequired, GraphQLFieldResolverParams, GraphQLRequestContextDidResolveSource, GraphQLRequestContextParsingDidStart, GraphQLRequestContextValidationDidStart, GraphQLRequestContextDidResolveOperation, GraphQLRequestContextDidEncounterErrors, GraphQLRequestContextResponseForOperation, GraphQLRequestContextExecutionDidStart, GraphQLRequestContextWillSendResponse } from 'apollo-server-types'; | ||
export { BaseContext, GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse, WithRequired, GraphQLFieldResolverParams, GraphQLRequestContextDidResolveSource, GraphQLRequestContextParsingDidStart, GraphQLRequestContextValidationDidStart, GraphQLRequestContextDidResolveOperation, GraphQLRequestContextDidEncounterErrors, GraphQLRequestContextResponseForOperation, GraphQLRequestContextExecutionDidStart, GraphQLRequestContextWillSendResponse, }; | ||
import { AnyFunctionMap, BaseContext, GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse, WithRequired, GraphQLFieldResolverParams, GraphQLRequestContextDidResolveSource, GraphQLRequestContextParsingDidStart, GraphQLRequestContextValidationDidStart, GraphQLRequestContextDidResolveOperation, GraphQLRequestContextDidEncounterErrors, GraphQLRequestContextResponseForOperation, GraphQLRequestContextExecutionDidStart, GraphQLRequestContextWillSendResponse, GraphQLSchemaContext } from 'apollo-server-types'; | ||
export { BaseContext, GraphQLServiceContext, GraphQLRequestContext, GraphQLRequest, GraphQLResponse, WithRequired, GraphQLFieldResolverParams, GraphQLRequestContextDidResolveSource, GraphQLRequestContextParsingDidStart, GraphQLRequestContextValidationDidStart, GraphQLRequestContextDidResolveOperation, GraphQLRequestContextDidEncounterErrors, GraphQLRequestContextResponseForOperation, GraphQLRequestContextExecutionDidStart, GraphQLRequestContextWillSendResponse, GraphQLSchemaContext, }; | ||
export interface ApolloServerPlugin<TContext extends BaseContext = BaseContext> { | ||
@@ -8,2 +8,3 @@ serverWillStart?(service: GraphQLServiceContext): Promise<GraphQLServerListener | void>; | ||
export interface GraphQLServerListener { | ||
schemaDidLoadOrUpdate?(schemaContext: GraphQLSchemaContext): void; | ||
serverWillStop?(): Promise<void>; | ||
@@ -10,0 +11,0 @@ renderLandingPage?(): Promise<LandingPage>; |
{ | ||
"name": "apollo-server-plugin-base", | ||
"version": "3.0.2", | ||
"version": "3.1.0-alpha.0", | ||
"description": "Apollo Server plugin base classes", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"apollo-server-types": "^3.0.2" | ||
"apollo-server-types": "^3.1.0-alpha.0" | ||
}, | ||
@@ -20,3 +20,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "69577df0b08d392e99d65644a27d48b9b925dd94" | ||
"gitHead": "4b0722e23503f776dab3e98088a0dc77436fe474" | ||
} |
@@ -18,2 +18,3 @@ import { | ||
GraphQLRequestContextWillSendResponse, | ||
GraphQLSchemaContext, | ||
} from 'apollo-server-types'; | ||
@@ -45,2 +46,3 @@ | ||
GraphQLRequestContextWillSendResponse, | ||
GraphQLSchemaContext, | ||
}; | ||
@@ -54,2 +56,3 @@ | ||
): Promise<GraphQLServerListener | void>; | ||
requestDidStart?( | ||
@@ -61,3 +64,6 @@ requestContext: GraphQLRequestContext<TContext>, | ||
export interface GraphQLServerListener { | ||
schemaDidLoadOrUpdate?(schemaContext: GraphQLSchemaContext): void; | ||
serverWillStop?(): Promise<void>; | ||
// At most one plugin's serverWillStart may return a GraphQLServerListener | ||
@@ -97,14 +103,19 @@ // with this method. If one does, it is called once on server startup and the | ||
): Promise<void>; | ||
parsingDidStart?( | ||
requestContext: GraphQLRequestContextParsingDidStart<TContext>, | ||
): Promise<GraphQLRequestListenerParsingDidEnd | void>; | ||
validationDidStart?( | ||
requestContext: GraphQLRequestContextValidationDidStart<TContext>, | ||
): Promise<GraphQLRequestListenerValidationDidEnd | void>; | ||
didResolveOperation?( | ||
requestContext: GraphQLRequestContextDidResolveOperation<TContext>, | ||
): Promise<void>; | ||
didEncounterErrors?( | ||
requestContext: GraphQLRequestContextDidEncounterErrors<TContext>, | ||
): Promise<void>; | ||
// If this hook is defined, it is invoked immediately before GraphQL execution | ||
@@ -118,5 +129,7 @@ // would take place. If its return value resolves to a non-null | ||
): Promise<GraphQLResponse | null>; | ||
executionDidStart?( | ||
requestContext: GraphQLRequestContextExecutionDidStart<TContext>, | ||
): Promise<GraphQLRequestExecutionListener | void>; | ||
willSendResponse?( | ||
@@ -123,0 +136,0 @@ requestContext: GraphQLRequestContextWillSendResponse<TContext>, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
13136
166
2