@envelop/types
Advanced tools
Comparing version
import { DefaultContext, OnExecuteDoneEventPayload, OnExecuteDoneHookResult, OnExecuteDoneHookResultOnNextHook } from '@envelop/core'; | ||
import { ExecutionResult } from 'graphql'; | ||
/** | ||
@@ -9,3 +8,3 @@ * Returns true if the provided object implements the AsyncIterator protocol via | ||
*/ | ||
export declare function isAsyncIterable(maybeAsyncIterable: any): maybeAsyncIterable is AsyncIterableIterator<ExecutionResult>; | ||
export declare function isAsyncIterable<T = any>(maybeAsyncIterable: any): maybeAsyncIterable is AsyncIterable<T>; | ||
/** | ||
@@ -12,0 +11,0 @@ * A utility function for hanlding `onExecuteDone` hook result, for simplifying the hanlding of AsyncIterable returned from `execute`. |
@@ -5,3 +5,3 @@ import type { DocumentNode, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, ParseOptions, Source, SubscriptionArgs, ValidationRule } from 'graphql'; | ||
import { DefaultContext } from './context-types'; | ||
import { AsyncIterableIteratorOrValue, ExecuteFunction, ParseFunction, ValidateFunction, ValidateFunctionParameter } from '@envelop/core'; | ||
import { ExecuteFunction, ParseFunction, ValidateFunction, ValidateFunctionParameter } from '@envelop/core'; | ||
import { SubscribeFunction } from './graphql'; | ||
@@ -321,7 +321,7 @@ import { Plugin } from './plugin'; | ||
*/ | ||
result: AsyncIterableIteratorOrValue<ExecutionResult>; | ||
result: AsyncIterableIterator<ExecutionResult> | ExecutionResult; | ||
/** | ||
* Replace the execution result with a new execution result. | ||
*/ | ||
setResult: (newResult: AsyncIterableIteratorOrValue<ExecutionResult>) => void; | ||
setResult: (newResult: AsyncIterableIterator<ExecutionResult> | ExecutionResult) => void; | ||
}; | ||
@@ -328,0 +328,0 @@ /** |
{ | ||
"name": "@envelop/types", | ||
"version": "1.2.0", | ||
"version": "1.3.0-alpha-e8998c9.0", | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"graphql": "^14.0.0 || ^15.0.0" | ||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" | ||
}, | ||
@@ -8,0 +8,0 @@ "repository": { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
27109
-0.14%677
-0.15%2
100%