@gqloom/core 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -185,11 +185,14 @@ declare class SubscriptionChainFactory<TOutput extends GraphQLSilk = never, TInp
|
|
|
185
185
|
protected clone(options?: Partial<ChainFactoryOptions>): this;
|
|
186
186
|
output<TOutputNew extends GraphQLSilk>(output: TOutputNew): SubscriptionChainFactory<TOutputNew, TInput>;
|
|
187
187
|
input<TInputNew extends GraphQLSilk | Record<string, GraphQLSilk>>(input: TInputNew): SubscriptionChainFactory<TOutput, TInputNew>;
|
|
188
|
-
subscribe<TValue = StandardSchemaV1.InferOutput<TOutput>>(subscribe: (input: InferInputO<TInput>) => MayPromise<AsyncIterator<TValue>>): ResolvableSubscription<TOutput, TInput, TValue>;
|
|
188
|
+
subscribe<TValue = StandardSchemaV1.InferOutput<TOutput>>(subscribe: (input: InferInputO<TInput>) => MayPromise<AsyncIterator<TValue>>): TValue extends StandardSchemaV1.InferOutput<TOutput> ? ResolvableSubscription<TOutput, TInput, TValue> : SubscriptionNeedResolve<TOutput, TInput, TValue>;
|
|
189
189
|
}
|
|
190
190
|
interface ResolvableSubscription<TOutput extends GraphQLSilk, TInput extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput>> extends Subscription<TOutput, TInput, TValue> {
|
|
191
191
|
resolve(resolve: (value: TValue, input: InferInputO<TInput>) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
192
192
|
}
|
|
193
|
+
interface SubscriptionNeedResolve<TOutput extends GraphQLSilk, TInput extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput>> {
|
|
194
|
+
resolve(resolve: (value: TValue, input: InferInputO<TInput>) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
195
|
+
}
|
|
193
196
|
declare class QueryFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Query<TOutput, TInput> {
|
|
194
197
|
protected output: TOutput;
|
|
195
198
|
protected readonly options: QueryOptions<TOutput, TInput>;
|
|
@@ -867,4 +870,4 @@ interface GQLoomExtensionAttribute {
|
|
|
867
870
|
directives?: string[];
|
|
868
871
|
}
|
|
869
872
|
|
|
870
|
-
export { BaseChainFactory, type BaseField, type BatchLoadFn, type CallableContextMemoization, type CallableInputParser, type CallableMiddlewareOptions, type ChainFactoryOptions, ChainResolver, ContextMemoization, type CoreSchemaWeaverConfig, type CoreSchemaWeaverConfigOptions, type DirectiveItem, type DirectiveRecord, EasyDataLoader, type Field, FieldChainFactory, type FieldConvertOptions, type FieldFactory, FieldFactoryWithResolve, type FieldFactoryWithUtils, type FieldMeta, type FieldOptions, type FieldOrOperation, type FieldOrOperationType, type GQLoomExtensionAttribute, type GQLoomExtensions, type GlobalWeaverContext, type GraphQLFieldOptions, GraphQLSchemaLoom, type GraphQLSilk, type IChainFactory, type InferFieldInput, type InferFieldOutput, type InferInputI, type InferInputO, type IsAny, type ListSilk, typesLoom as Loom, LoomObjectType, type MayPromise, type Middleware, type MiddlewareOptions, type Mutation, MutationChainFactory, type MutationFactory, type MutationFactoryWithChain, MutationFactoryWithResolve, type MutationOptions, type NonNullSilk, type NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, type OmitInUnion, type OnlyMemoizationPayload, type Operation, type OperationType, type Query, QueryChainFactory, type QueryFactory, type QueryFactoryWithChain, QueryFactoryWithResolve, type QueryOptions, type ResolvableSubscription, type Resolver, type ResolverFactory, type ResolverOptions, type ResolverOptionsWithExtensions, type ResolverOptionsWithParent, type ResolverPayload, type ResolvingOptions, symbols as SYMBOLS, type SchemaWeaver, StandardSchemaV1, type Subscription, SubscriptionChainFactory, type SubscriptionFactory, type SubscriptionFactoryWithChain, type SubscriptionOptions, type ValueOf, type WeaverConfig, type WeaverContext, applyMiddlewares, capitalize, collectName, collectNames, compose, createField, createInputParser, createMemoization, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, getCacheType, getFieldOptions, getGraphQLType, getOperationOptions, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseSilk, pascalCase, provideWeaverContext, query, resolver, resolverPayloadStorage, silk, subscription, toObjMap, tryIn, useContext, useMemoizationMap, useResolverPayload, weave, weaverContext };
|
|
873
|
+
export { BaseChainFactory, type BaseField, type BatchLoadFn, type CallableContextMemoization, type CallableInputParser, type CallableMiddlewareOptions, type ChainFactoryOptions, ChainResolver, ContextMemoization, type CoreSchemaWeaverConfig, type CoreSchemaWeaverConfigOptions, type DirectiveItem, type DirectiveRecord, EasyDataLoader, type Field, FieldChainFactory, type FieldConvertOptions, type FieldFactory, FieldFactoryWithResolve, type FieldFactoryWithUtils, type FieldMeta, type FieldOptions, type FieldOrOperation, type FieldOrOperationType, type GQLoomExtensionAttribute, type GQLoomExtensions, type GlobalWeaverContext, type GraphQLFieldOptions, GraphQLSchemaLoom, type GraphQLSilk, type IChainFactory, type InferFieldInput, type InferFieldOutput, type InferInputI, type InferInputO, type IsAny, type ListSilk, typesLoom as Loom, LoomObjectType, type MayPromise, type Middleware, type MiddlewareOptions, type Mutation, MutationChainFactory, type MutationFactory, type MutationFactoryWithChain, MutationFactoryWithResolve, type MutationOptions, type NonNullSilk, type NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, type OmitInUnion, type OnlyMemoizationPayload, type Operation, type OperationType, type Query, QueryChainFactory, type QueryFactory, type QueryFactoryWithChain, QueryFactoryWithResolve, type QueryOptions, type ResolvableSubscription, type Resolver, type ResolverFactory, type ResolverOptions, type ResolverOptionsWithExtensions, type ResolverOptionsWithParent, type ResolverPayload, type ResolvingOptions, symbols as SYMBOLS, type SchemaWeaver, StandardSchemaV1, type Subscription, SubscriptionChainFactory, type SubscriptionFactory, type SubscriptionFactoryWithChain, type SubscriptionNeedResolve, type SubscriptionOptions, type ValueOf, type WeaverConfig, type WeaverContext, applyMiddlewares, capitalize, collectName, collectNames, compose, createField, createInputParser, createMemoization, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, getCacheType, getFieldOptions, getGraphQLType, getOperationOptions, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseSilk, pascalCase, provideWeaverContext, query, resolver, resolverPayloadStorage, silk, subscription, toObjMap, tryIn, useContext, useMemoizationMap, useResolverPayload, weave, weaverContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -185,11 +185,14 @@ declare class SubscriptionChainFactory<TOutput extends GraphQLSilk = never, TInp
|
|
|
185
185
|
protected clone(options?: Partial<ChainFactoryOptions>): this;
|
|
186
186
|
output<TOutputNew extends GraphQLSilk>(output: TOutputNew): SubscriptionChainFactory<TOutputNew, TInput>;
|
|
187
187
|
input<TInputNew extends GraphQLSilk | Record<string, GraphQLSilk>>(input: TInputNew): SubscriptionChainFactory<TOutput, TInputNew>;
|
|
188
|
-
subscribe<TValue = StandardSchemaV1.InferOutput<TOutput>>(subscribe: (input: InferInputO<TInput>) => MayPromise<AsyncIterator<TValue>>): ResolvableSubscription<TOutput, TInput, TValue>;
|
|
188
|
+
subscribe<TValue = StandardSchemaV1.InferOutput<TOutput>>(subscribe: (input: InferInputO<TInput>) => MayPromise<AsyncIterator<TValue>>): TValue extends StandardSchemaV1.InferOutput<TOutput> ? ResolvableSubscription<TOutput, TInput, TValue> : SubscriptionNeedResolve<TOutput, TInput, TValue>;
|
|
189
189
|
}
|
|
190
190
|
interface ResolvableSubscription<TOutput extends GraphQLSilk, TInput extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput>> extends Subscription<TOutput, TInput, TValue> {
|
|
191
191
|
resolve(resolve: (value: TValue, input: InferInputO<TInput>) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
192
192
|
}
|
|
193
|
+
interface SubscriptionNeedResolve<TOutput extends GraphQLSilk, TInput extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput>> {
|
|
194
|
+
resolve(resolve: (value: TValue, input: InferInputO<TInput>) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
195
|
+
}
|
|
193
196
|
declare class QueryFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Query<TOutput, TInput> {
|
|
194
197
|
protected output: TOutput;
|
|
195
198
|
protected readonly options: QueryOptions<TOutput, TInput>;
|
|
@@ -867,4 +870,4 @@ interface GQLoomExtensionAttribute {
|
|
|
867
870
|
directives?: string[];
|
|
868
871
|
}
|
|
869
872
|
|
|
870
|
-
export { BaseChainFactory, type BaseField, type BatchLoadFn, type CallableContextMemoization, type CallableInputParser, type CallableMiddlewareOptions, type ChainFactoryOptions, ChainResolver, ContextMemoization, type CoreSchemaWeaverConfig, type CoreSchemaWeaverConfigOptions, type DirectiveItem, type DirectiveRecord, EasyDataLoader, type Field, FieldChainFactory, type FieldConvertOptions, type FieldFactory, FieldFactoryWithResolve, type FieldFactoryWithUtils, type FieldMeta, type FieldOptions, type FieldOrOperation, type FieldOrOperationType, type GQLoomExtensionAttribute, type GQLoomExtensions, type GlobalWeaverContext, type GraphQLFieldOptions, GraphQLSchemaLoom, type GraphQLSilk, type IChainFactory, type InferFieldInput, type InferFieldOutput, type InferInputI, type InferInputO, type IsAny, type ListSilk, typesLoom as Loom, LoomObjectType, type MayPromise, type Middleware, type MiddlewareOptions, type Mutation, MutationChainFactory, type MutationFactory, type MutationFactoryWithChain, MutationFactoryWithResolve, type MutationOptions, type NonNullSilk, type NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, type OmitInUnion, type OnlyMemoizationPayload, type Operation, type OperationType, type Query, QueryChainFactory, type QueryFactory, type QueryFactoryWithChain, QueryFactoryWithResolve, type QueryOptions, type ResolvableSubscription, type Resolver, type ResolverFactory, type ResolverOptions, type ResolverOptionsWithExtensions, type ResolverOptionsWithParent, type ResolverPayload, type ResolvingOptions, symbols as SYMBOLS, type SchemaWeaver, StandardSchemaV1, type Subscription, SubscriptionChainFactory, type SubscriptionFactory, type SubscriptionFactoryWithChain, type SubscriptionOptions, type ValueOf, type WeaverConfig, type WeaverContext, applyMiddlewares, capitalize, collectName, collectNames, compose, createField, createInputParser, createMemoization, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, getCacheType, getFieldOptions, getGraphQLType, getOperationOptions, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseSilk, pascalCase, provideWeaverContext, query, resolver, resolverPayloadStorage, silk, subscription, toObjMap, tryIn, useContext, useMemoizationMap, useResolverPayload, weave, weaverContext };
|
|
873
|
+
export { BaseChainFactory, type BaseField, type BatchLoadFn, type CallableContextMemoization, type CallableInputParser, type CallableMiddlewareOptions, type ChainFactoryOptions, ChainResolver, ContextMemoization, type CoreSchemaWeaverConfig, type CoreSchemaWeaverConfigOptions, type DirectiveItem, type DirectiveRecord, EasyDataLoader, type Field, FieldChainFactory, type FieldConvertOptions, type FieldFactory, FieldFactoryWithResolve, type FieldFactoryWithUtils, type FieldMeta, type FieldOptions, type FieldOrOperation, type FieldOrOperationType, type GQLoomExtensionAttribute, type GQLoomExtensions, type GlobalWeaverContext, type GraphQLFieldOptions, GraphQLSchemaLoom, type GraphQLSilk, type IChainFactory, type InferFieldInput, type InferFieldOutput, type InferInputI, type InferInputO, type IsAny, type ListSilk, typesLoom as Loom, LoomObjectType, type MayPromise, type Middleware, type MiddlewareOptions, type Mutation, MutationChainFactory, type MutationFactory, type MutationFactoryWithChain, MutationFactoryWithResolve, type MutationOptions, type NonNullSilk, type NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, type OmitInUnion, type OnlyMemoizationPayload, type Operation, type OperationType, type Query, QueryChainFactory, type QueryFactory, type QueryFactoryWithChain, QueryFactoryWithResolve, type QueryOptions, type ResolvableSubscription, type Resolver, type ResolverFactory, type ResolverOptions, type ResolverOptionsWithExtensions, type ResolverOptionsWithParent, type ResolverPayload, type ResolvingOptions, symbols as SYMBOLS, type SchemaWeaver, StandardSchemaV1, type Subscription, SubscriptionChainFactory, type SubscriptionFactory, type SubscriptionFactoryWithChain, type SubscriptionNeedResolve, type SubscriptionOptions, type ValueOf, type WeaverConfig, type WeaverContext, applyMiddlewares, capitalize, collectName, collectNames, compose, createField, createInputParser, createMemoization, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, getCacheType, getFieldOptions, getGraphQLType, getOperationOptions, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseSilk, pascalCase, provideWeaverContext, query, resolver, resolverPayloadStorage, silk, subscription, toObjMap, tryIn, useContext, useMemoizationMap, useResolverPayload, weave, weaverContext };
|