@envelop/types
Advanced tools
Comparing version 1.0.2 to 1.1.0-alpha-1e3a5f8.0
@@ -206,3 +206,17 @@ import type { DocumentNode, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, ParseOptions, Source, SubscriptionArgs, ValidationRule } from 'graphql'; | ||
*/ | ||
export declare type AfterContextBuildingHook<ContextType> = (options: AfterContextBuildingEventPayload<ContextType>) => PromiseOrValue<void>; | ||
export declare type OnEndContextBuildingHook<ContextType> = (options: AfterContextBuildingEventPayload<ContextType>) => PromiseOrValue<void>; | ||
declare type OnErrorContextBuildingHookEventPayload = { | ||
/** The error or thing that got rejected or thrown */ | ||
error: unknown; | ||
/** Overwrite the error or thing that got rejected or thrown. */ | ||
setError: (err: unknown) => void; | ||
}; | ||
export declare type OnErrorContextBuildingHook = (options: OnErrorContextBuildingHookEventPayload) => PromiseOrValue<void>; | ||
export declare type AfterContextBuildingHooks<ContextType> = { | ||
/** Invoked after the context was created successfully. */ | ||
onEnd?: OnEndContextBuildingHook<ContextType>; | ||
/** Invoked after the context creation failed. */ | ||
onError?: OnErrorContextBuildingHook; | ||
}; | ||
export declare type AfterContextBuildingHook<ContextType> = OnEndContextBuildingHook<ContextType> | AfterContextBuildingHooks<ContextType>; | ||
/** | ||
@@ -417,1 +431,2 @@ * Invoked before the context has been builded. | ||
export declare type OnSubscribeHook<ContextType> = (options: OnSubscribeEventPayload<ContextType>) => PromiseOrValue<void | OnSubscribeHookResult<ContextType>>; | ||
export {}; |
@@ -36,2 +36,1 @@ 'use strict'; | ||
exports.isAsyncIterable = isAsyncIterable; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@envelop/types", | ||
"version": "1.0.2", | ||
"version": "1.1.0-alpha-1e3a5f8.0", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
654
26270
11
2