@envelop/types
Advanced tools
Comparing version 0.2.2-alpha-e01c930.0 to 0.3.0-alpha-dbb9991.0
@@ -79,12 +79,5 @@ import { DocumentNode, execute, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, parse, ParseOptions, Source, subscribe, SubscriptionArgs, TypeInfo, validate, ValidationRule } from 'graphql'; | ||
export declare type OnContextBuildingHook<ContextType> = (options: OnContextBuildingEventPayload<ContextType>) => PromiseOrValue<void | AfterContextBuildingHook<ContextType>>; | ||
/** onExecute */ | ||
export declare type OriginalExecuteFn = typeof execute; | ||
export declare type OnExecuteEventPayload<ContextType> = { | ||
executeFn: OriginalExecuteFn; | ||
args: ExecutionArgs; | ||
setExecuteFn: (newExecute: OriginalExecuteFn) => void; | ||
setResultAndStopExecution: (newResult: ExecutionResult) => void; | ||
extendContext: (contextExtension: Partial<ContextType>) => void; | ||
}; | ||
export declare type OnBeforeResolverCalledEventPayload<ParentType = unknown, ArgsType = DefaultArgs, ContextType = unknown> = { | ||
/** onResolverCalled */ | ||
export declare type ResolverFn<ParentType = unknown, ArgsType = DefaultArgs, ContextType = unknown, ResultType = unknown> = (root: ParentType, args: ArgsType, context: ContextType, info: GraphQLResolveInfo) => PromiseOrValue<ResultType>; | ||
export declare type OnBeforeResolverCalledEventPayload<ParentType = unknown, ArgsType = DefaultArgs, ContextType = unknown, ResultType = unknown> = { | ||
root: ParentType; | ||
@@ -94,2 +87,4 @@ args: ArgsType; | ||
info: GraphQLResolveInfo; | ||
resolverFn: ResolverFn<ParentType, ArgsType, ContextType, ResultType>; | ||
replaceResolverFn: (newResolver: ResolverFn<ParentType, ArgsType, ContextType, ResultType>) => void; | ||
}; | ||
@@ -101,3 +96,12 @@ export declare type AfterResolverEventPayload = { | ||
export declare type AfterResolverHook = (options: AfterResolverEventPayload) => void; | ||
export declare type OnResolverCalledHook<ParentType = unknown, ArgsType = DefaultArgs, ContextType = DefaultContext> = (options: OnBeforeResolverCalledEventPayload<ParentType, ArgsType, ContextType>) => PromiseOrValue<void | AfterResolverHook>; | ||
export declare type OnResolverCalledHook<ParentType = unknown, ArgsType = DefaultArgs, ContextType = DefaultContext, ResultType = unknown> = (options: OnBeforeResolverCalledEventPayload<ParentType, ArgsType, ContextType, ResultType>) => PromiseOrValue<void | AfterResolverHook>; | ||
/** onExecute */ | ||
export declare type OriginalExecuteFn = typeof execute; | ||
export declare type OnExecuteEventPayload<ContextType> = { | ||
executeFn: OriginalExecuteFn; | ||
args: ExecutionArgs; | ||
setExecuteFn: (newExecute: OriginalExecuteFn) => void; | ||
setResultAndStopExecution: (newResult: ExecutionResult) => void; | ||
extendContext: (contextExtension: Partial<ContextType>) => void; | ||
}; | ||
export declare type OnExecuteDoneEventPayload = { | ||
@@ -104,0 +108,0 @@ result: ExecutionResult; |
{ | ||
"name": "@envelop/types", | ||
"version": "0.2.2-alpha-e01c930.0", | ||
"version": "0.3.0-alpha-dbb9991.0", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11599
198
0