@envelop/types
Advanced tools
Comparing version 0.4.2 to 0.5.0-alpha-3faaeae.0
@@ -1,5 +0,7 @@ | ||
import { DocumentNode, execute, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, parse, ParseOptions, Source, subscribe, SubscriptionArgs, TypeInfo, validate, ValidationRule } from 'graphql'; | ||
import type { DocumentNode, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, parse, ParseOptions, Source, SubscriptionArgs, TypeInfo, validate, ValidationRule } from 'graphql'; | ||
import { Maybe } from 'graphql/jsutils/Maybe'; | ||
import { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue'; | ||
import { DefaultContext } from './context-types'; | ||
import { AsyncIterableIteratorOrValue, ExecuteFunction } from '@envelop/core'; | ||
import { SubscribeFunction } from './graphql'; | ||
import { Plugin } from './plugin'; | ||
@@ -107,3 +109,3 @@ export declare type DefaultArgs = Record<string, unknown>; | ||
}; | ||
export declare type OriginalExecuteFn = typeof execute; | ||
export declare type OriginalExecuteFn = ExecuteFunction; | ||
export declare type OnExecuteEventPayload<ContextType> = { | ||
@@ -116,7 +118,17 @@ executeFn: OriginalExecuteFn; | ||
}; | ||
export declare type OnExecuteDoneEventPayload = { | ||
export declare type OnExecuteDoneHookResultOnNextHookPayload = { | ||
result: ExecutionResult; | ||
setResult: (newResult: ExecutionResult) => void; | ||
}; | ||
export declare type OnExecuteDoneHook = (options: OnExecuteDoneEventPayload) => void; | ||
export declare type OnExecuteDoneHookResultOnNextHook = (payload: OnExecuteDoneHookResultOnNextHookPayload) => void | Promise<void>; | ||
export declare type OnExecuteDoneHookResultOnEndHook = () => void; | ||
export declare type OnExecuteDoneHookResult = { | ||
onNext?: OnExecuteDoneHookResultOnNextHook; | ||
onEnd?: OnExecuteDoneHookResultOnEndHook; | ||
}; | ||
export declare type OnExecuteDoneEventPayload = { | ||
result: AsyncIterableIteratorOrValue<ExecutionResult>; | ||
setResult: (newResult: AsyncIterableIteratorOrValue<ExecutionResult>) => void; | ||
}; | ||
export declare type OnExecuteDoneHook = (options: OnExecuteDoneEventPayload) => void | OnExecuteDoneHookResult; | ||
export declare type OnExecuteHookResult<ContextType> = { | ||
@@ -131,3 +143,3 @@ onExecuteDone?: OnExecuteDoneHook; | ||
}; | ||
export declare type OriginalSubscribeFn = typeof subscribe; | ||
export declare type OriginalSubscribeFn = SubscribeFunction; | ||
export declare type OnSubscribeEventPayload<ContextType> = { | ||
@@ -143,3 +155,13 @@ subscribeFn: OriginalSubscribeFn; | ||
}; | ||
export declare type SubscribeResultHook = (options: OnSubscribeResultEventPayload) => void; | ||
export declare type OnSubscribeResultResultOnNextHookPayload = { | ||
result: ExecutionResult; | ||
setResult: (newResult: ExecutionResult) => void; | ||
}; | ||
export declare type OnSubscribeResultResultOnNextHook = (payload: OnSubscribeResultResultOnNextHookPayload) => void | Promise<void>; | ||
export declare type OnSubscribeResultResultOnEndHook = () => void; | ||
export declare type OnSubscribeResultResult = { | ||
onNext?: OnSubscribeResultResultOnNextHook; | ||
onEnd?: OnSubscribeResultResultOnEndHook; | ||
}; | ||
export declare type SubscribeResultHook = (options: OnSubscribeResultEventPayload) => void | OnSubscribeResultResult; | ||
export declare type OnSubscribeHookResult<ContextType> = { | ||
@@ -146,0 +168,0 @@ onSubscribeResult?: SubscribeResultHook; |
@@ -5,2 +5,3 @@ export * from './context-types'; | ||
export * from './get-enveloped'; | ||
export * from './graphql'; | ||
export * from './utils'; |
{ | ||
"name": "@envelop/types", | ||
"version": "0.4.2", | ||
"version": "0.5.0-alpha-3faaeae.0", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
@@ -21,2 +21,3 @@ export declare type OptionalPropertyNames<T> = { | ||
export declare type PromiseOrValue<T> = T | Promise<T>; | ||
export declare type AsyncIterableIteratorOrValue<T> = T | AsyncIterableIterator<T>; | ||
export declare type Maybe<T> = T | null | undefined; |
14855
12
267