@envelop/types
Advanced tools
Comparing version 0.4.1 to 0.5.0-alpha-728ec6f.0
@@ -1,5 +0,6 @@ | ||
import { DocumentNode, execute, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, parse, ParseOptions, Source, subscribe, SubscriptionArgs, TypeInfo, validate, ValidationRule } from 'graphql'; | ||
import type { DocumentNode, execute, 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 'packages/core/src'; | ||
import { SubscribeFunction } from './graphql'; | ||
import { Plugin } from './plugin'; | ||
@@ -129,3 +130,3 @@ export declare type DefaultArgs = Record<string, unknown>; | ||
}; | ||
export declare type OriginalSubscribeFn = typeof subscribe; | ||
export declare type OriginalSubscribeFn = SubscribeFunction; | ||
export declare type OnSubscribeEventPayload<ContextType> = { | ||
@@ -141,3 +142,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> = { | ||
@@ -144,0 +155,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.1", | ||
"version": "0.5.0-alpha-728ec6f.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; |
13749
12
243