@gqloom/core 0.9.5 → 0.9.6
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/{context-DpbzXubn.d.cts → context-D0Bwgtgg.d.cts} +9 -6
- package/dist/{context-DpbzXubn.d.ts → context-D0Bwgtgg.d.ts} +9 -6
- package/dist/context.d.cts +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/index.cjs +41 -14
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +41 -14
- package/package.json +1 -1
|
@@ -434,27 +434,30 @@ interface SubscriptionNeedResolve<TOutput extends GraphQLSilk, TInput extends Gr
|
|
|
434
434
|
resolve(resolve: (value: TValue, input: InferInputO<TInput>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
435
435
|
}
|
|
436
436
|
declare class QueryFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Query<TOutput, TInput> {
|
|
437
|
-
protected
|
|
437
|
+
protected outputSilk: TOutput;
|
|
438
438
|
protected readonly options: QueryOptions<TOutput, TInput>;
|
|
439
439
|
get "~meta"(): Query<TOutput, TInput>["~meta"];
|
|
440
|
-
constructor(
|
|
440
|
+
constructor(outputSilk: TOutput, options: QueryOptions<TOutput, TInput>);
|
|
441
441
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
442
442
|
input<TInputNew extends GraphQLSilk<TInputO>>(input: TInputNew): QueryFactoryWithResolve<TInputO, TOutput, TInputNew>;
|
|
443
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): QueryFactoryWithResolve<TInputO, TOutputNew, TInput>;
|
|
443
444
|
}
|
|
444
445
|
declare class MutationFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Mutation<TOutput, TInput> {
|
|
445
|
-
protected
|
|
446
|
+
protected outputSilk: TOutput;
|
|
446
447
|
protected readonly options: MutationOptions<TOutput, TInput>;
|
|
447
448
|
get "~meta"(): Mutation<TOutput, TInput>["~meta"];
|
|
448
|
-
constructor(
|
|
449
|
+
constructor(outputSilk: TOutput, options: MutationOptions<TOutput, TInput>);
|
|
449
450
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
450
451
|
input<TInputNew extends GraphQLSilk<TInputO>>(input: TInputNew): MutationFactoryWithResolve<TInputO, TOutput, TInputNew>;
|
|
452
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): MutationFactoryWithResolve<TInputO, TOutputNew, TInput>;
|
|
451
453
|
}
|
|
452
454
|
declare class FieldFactoryWithResolve<TParent extends GraphQLSilk, TOutput extends GraphQLSilk> extends BaseChainFactory<Field<TParent, TOutput, undefined, string[] | undefined>> {
|
|
453
|
-
protected
|
|
455
|
+
protected outputSilk: TOutput;
|
|
454
456
|
protected readonly options: FieldOptions<TParent, TOutput, undefined, string[] | undefined>;
|
|
455
457
|
get "~meta"(): Field<TParent, TOutput, undefined, string[] | undefined>["~meta"];
|
|
456
|
-
constructor(
|
|
458
|
+
constructor(outputSilk: TOutput, options: FieldOptions<TParent, TOutput, undefined, string[] | undefined>);
|
|
457
459
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
460
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): FieldFactoryWithResolve<TParent, TOutputNew>;
|
|
458
461
|
}
|
|
459
462
|
|
|
460
463
|
interface FieldMeta extends GraphQLFieldOptions {
|
|
@@ -434,27 +434,30 @@ interface SubscriptionNeedResolve<TOutput extends GraphQLSilk, TInput extends Gr
|
|
|
434
434
|
resolve(resolve: (value: TValue, input: InferInputO<TInput>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput>>): Subscription<TOutput, TInput, TValue>;
|
|
435
435
|
}
|
|
436
436
|
declare class QueryFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Query<TOutput, TInput> {
|
|
437
|
-
protected
|
|
437
|
+
protected outputSilk: TOutput;
|
|
438
438
|
protected readonly options: QueryOptions<TOutput, TInput>;
|
|
439
439
|
get "~meta"(): Query<TOutput, TInput>["~meta"];
|
|
440
|
-
constructor(
|
|
440
|
+
constructor(outputSilk: TOutput, options: QueryOptions<TOutput, TInput>);
|
|
441
441
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
442
442
|
input<TInputNew extends GraphQLSilk<TInputO>>(input: TInputNew): QueryFactoryWithResolve<TInputO, TOutput, TInputNew>;
|
|
443
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): QueryFactoryWithResolve<TInputO, TOutputNew, TInput>;
|
|
443
444
|
}
|
|
444
445
|
declare class MutationFactoryWithResolve<TInputO, TOutput extends GraphQLSilk, TInput extends GraphQLSilk<TInputO>> extends BaseChainFactory<Query<TOutput, TInput>> implements Mutation<TOutput, TInput> {
|
|
445
|
-
protected
|
|
446
|
+
protected outputSilk: TOutput;
|
|
446
447
|
protected readonly options: MutationOptions<TOutput, TInput>;
|
|
447
448
|
get "~meta"(): Mutation<TOutput, TInput>["~meta"];
|
|
448
|
-
constructor(
|
|
449
|
+
constructor(outputSilk: TOutput, options: MutationOptions<TOutput, TInput>);
|
|
449
450
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
450
451
|
input<TInputNew extends GraphQLSilk<TInputO>>(input: TInputNew): MutationFactoryWithResolve<TInputO, TOutput, TInputNew>;
|
|
452
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): MutationFactoryWithResolve<TInputO, TOutputNew, TInput>;
|
|
451
453
|
}
|
|
452
454
|
declare class FieldFactoryWithResolve<TParent extends GraphQLSilk, TOutput extends GraphQLSilk> extends BaseChainFactory<Field<TParent, TOutput, undefined, string[] | undefined>> {
|
|
453
|
-
protected
|
|
455
|
+
protected outputSilk: TOutput;
|
|
454
456
|
protected readonly options: FieldOptions<TParent, TOutput, undefined, string[] | undefined>;
|
|
455
457
|
get "~meta"(): Field<TParent, TOutput, undefined, string[] | undefined>["~meta"];
|
|
456
|
-
constructor(
|
|
458
|
+
constructor(outputSilk: TOutput, options: FieldOptions<TParent, TOutput, undefined, string[] | undefined>);
|
|
457
459
|
protected clone(options?: Partial<typeof this.options> | undefined): this;
|
|
460
|
+
output<TOutputNew extends GraphQLSilk>(output: TOutputNew, transform: (output: StandardSchemaV1.InferOutput<TOutput>) => MayPromise<StandardSchemaV1.InferOutput<TOutputNew>>): FieldFactoryWithResolve<TParent, TOutputNew>;
|
|
458
461
|
}
|
|
459
462
|
|
|
460
463
|
interface FieldMeta extends GraphQLFieldOptions {
|
package/dist/context.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as OnlyMemoizationPayload, R as ResolverPayload, B as BaseField, v as Middleware, K as ResolvingFields } from './context-
|
|
1
|
+
import { P as OnlyMemoizationPayload, R as ResolverPayload, B as BaseField, v as Middleware, K as ResolvingFields } from './context-D0Bwgtgg.cjs';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
3
|
import 'graphql';
|
|
4
4
|
|
package/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as OnlyMemoizationPayload, R as ResolverPayload, B as BaseField, v as Middleware, K as ResolvingFields } from './context-
|
|
1
|
+
import { P as OnlyMemoizationPayload, R as ResolverPayload, B as BaseField, v as Middleware, K as ResolvingFields } from './context-D0Bwgtgg.js';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
3
|
import 'graphql';
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -1101,64 +1101,91 @@ var SubscriptionChainFactory = class _SubscriptionChainFactory extends BaseChain
|
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
var QueryFactoryWithResolve = class _QueryFactoryWithResolve extends BaseChainFactory {
|
|
1104
|
-
constructor(
|
|
1104
|
+
constructor(outputSilk, options) {
|
|
1105
1105
|
super(options);
|
|
1106
|
-
this.
|
|
1106
|
+
this.outputSilk = outputSilk;
|
|
1107
1107
|
this.options = options;
|
|
1108
1108
|
}
|
|
1109
1109
|
get "~meta"() {
|
|
1110
|
-
return loom.query(this.
|
|
1110
|
+
return loom.query(this.outputSilk, this.options)["~meta"];
|
|
1111
1111
|
}
|
|
1112
1112
|
clone(options) {
|
|
1113
|
-
return new _QueryFactoryWithResolve(this.
|
|
1113
|
+
return new _QueryFactoryWithResolve(this.outputSilk, {
|
|
1114
1114
|
...this.options,
|
|
1115
1115
|
...options
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
input(input) {
|
|
1119
|
-
return new _QueryFactoryWithResolve(this.
|
|
1119
|
+
return new _QueryFactoryWithResolve(this.outputSilk, {
|
|
1120
1120
|
...this.options,
|
|
1121
1121
|
input
|
|
1122
1122
|
});
|
|
1123
1123
|
}
|
|
1124
|
+
output(output, transform) {
|
|
1125
|
+
return new _QueryFactoryWithResolve(output, {
|
|
1126
|
+
...this.options,
|
|
1127
|
+
middlewares: [
|
|
1128
|
+
...this.options.middlewares ?? [],
|
|
1129
|
+
async (next) => transform(await next())
|
|
1130
|
+
]
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1124
1133
|
};
|
|
1125
1134
|
var MutationFactoryWithResolve = class _MutationFactoryWithResolve extends BaseChainFactory {
|
|
1126
|
-
constructor(
|
|
1135
|
+
constructor(outputSilk, options) {
|
|
1127
1136
|
super(options);
|
|
1128
|
-
this.
|
|
1137
|
+
this.outputSilk = outputSilk;
|
|
1129
1138
|
this.options = options;
|
|
1130
1139
|
}
|
|
1131
1140
|
get "~meta"() {
|
|
1132
|
-
return loom.mutation(this.
|
|
1141
|
+
return loom.mutation(this.outputSilk, this.options)["~meta"];
|
|
1133
1142
|
}
|
|
1134
1143
|
clone(options) {
|
|
1135
|
-
return new _MutationFactoryWithResolve(this.
|
|
1144
|
+
return new _MutationFactoryWithResolve(this.outputSilk, {
|
|
1136
1145
|
...this.options,
|
|
1137
1146
|
...options
|
|
1138
1147
|
});
|
|
1139
1148
|
}
|
|
1140
1149
|
input(input) {
|
|
1141
|
-
return new _MutationFactoryWithResolve(this.
|
|
1150
|
+
return new _MutationFactoryWithResolve(this.outputSilk, {
|
|
1142
1151
|
...this.options,
|
|
1143
1152
|
input
|
|
1144
1153
|
});
|
|
1145
1154
|
}
|
|
1155
|
+
output(output, transform) {
|
|
1156
|
+
return new _MutationFactoryWithResolve(output, {
|
|
1157
|
+
...this.options,
|
|
1158
|
+
middlewares: [
|
|
1159
|
+
...this.options.middlewares ?? [],
|
|
1160
|
+
async (next) => transform(await next())
|
|
1161
|
+
]
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1146
1164
|
};
|
|
1147
1165
|
var FieldFactoryWithResolve = class _FieldFactoryWithResolve extends BaseChainFactory {
|
|
1148
|
-
constructor(
|
|
1166
|
+
constructor(outputSilk, options) {
|
|
1149
1167
|
super(options);
|
|
1150
|
-
this.
|
|
1168
|
+
this.outputSilk = outputSilk;
|
|
1151
1169
|
this.options = options;
|
|
1152
1170
|
}
|
|
1153
1171
|
get "~meta"() {
|
|
1154
|
-
return loom.field(this.
|
|
1172
|
+
return loom.field(this.outputSilk, this.options)["~meta"];
|
|
1155
1173
|
}
|
|
1156
1174
|
clone(options) {
|
|
1157
|
-
return new _FieldFactoryWithResolve(this.
|
|
1175
|
+
return new _FieldFactoryWithResolve(this.outputSilk, {
|
|
1158
1176
|
...this.options,
|
|
1159
1177
|
...options
|
|
1160
1178
|
});
|
|
1161
1179
|
}
|
|
1180
|
+
output(output, transform) {
|
|
1181
|
+
return new _FieldFactoryWithResolve(output, {
|
|
1182
|
+
...this.options,
|
|
1183
|
+
middlewares: [
|
|
1184
|
+
...this.options.middlewares ?? [],
|
|
1185
|
+
async (next) => transform(await next())
|
|
1186
|
+
]
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1162
1189
|
};
|
|
1163
1190
|
|
|
1164
1191
|
// src/resolver/resolver.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldOptions, Q as QueryOptions, M as MutationOptions, R as ResolverPayload, S as SubscriptionOptions, G as GraphQLFieldOptions, a as StandardSchemaV1, b as GraphQLSilk, c as MayPromise, d as Query, e as QueryChainFactory, f as QueryFactoryWithChain, g as Mutation, h as MutationChainFactory, i as MutationFactoryWithChain, j as Field, k as FieldChainFactory, l as FieldFactoryWithUtils, m as SubscriptionChainFactory, n as Subscription, o as SubscriptionFactoryWithChain, O as Operation, p as FIELD_HIDDEN, q as ResolverOptionsWithExtensions, r as OmitInUnion, V as ValueOf, s as ResolverOptions, t as FieldOrOperation, u as Resolver, I as IS_RESOLVER, v as Middleware, w as InferInputI, W as WEAVER_CONFIG, B as BaseField } from './context-
|
|
2
|
-
export { $ as BaseChainFactory, ai as CallableInputParser, D as CallableMiddlewareOptions, _ as ChainFactoryOptions, ae as FieldFactory, a4 as FieldFactoryWithResolve, ag as FieldMeta, a9 as FieldOrOperationType, Z as IChainFactory, aa as InferFieldInput, ab as InferFieldOutput, ah as InferInputO, y as IsAny, a5 as Loom, E as MiddlewareConfig, A as MiddlewareOperation, C as MiddlewareOptions, ad as MutationFactory, a3 as MutationFactoryWithResolve, P as OnlyMemoizationPayload, a8 as OperationType, ac as QueryFactory, a2 as QueryFactoryWithResolve, z as RequireKeys, a0 as ResolvableSubscription, a6 as ResolverOptionsWithParent, K as ResolvingFields, a7 as ResolvingOptions, x as SYMBOLS, af as SubscriptionFactory, a1 as SubscriptionNeedResolve, H as applyMiddlewares, Y as assignContextMap, aj as createInputParser, J as filterMiddlewares, X as getMemoizationMap, L as getResolvingFields, al as getStandardValue, U as isOnlyMemoryPayload, T as onlyMemoization, ak as parseInputValue, N as parseResolvingFields } from './context-
|
|
1
|
+
import { F as FieldOptions, Q as QueryOptions, M as MutationOptions, R as ResolverPayload, S as SubscriptionOptions, G as GraphQLFieldOptions, a as StandardSchemaV1, b as GraphQLSilk, c as MayPromise, d as Query, e as QueryChainFactory, f as QueryFactoryWithChain, g as Mutation, h as MutationChainFactory, i as MutationFactoryWithChain, j as Field, k as FieldChainFactory, l as FieldFactoryWithUtils, m as SubscriptionChainFactory, n as Subscription, o as SubscriptionFactoryWithChain, O as Operation, p as FIELD_HIDDEN, q as ResolverOptionsWithExtensions, r as OmitInUnion, V as ValueOf, s as ResolverOptions, t as FieldOrOperation, u as Resolver, I as IS_RESOLVER, v as Middleware, w as InferInputI, W as WEAVER_CONFIG, B as BaseField } from './context-D0Bwgtgg.cjs';
|
|
2
|
+
export { $ as BaseChainFactory, ai as CallableInputParser, D as CallableMiddlewareOptions, _ as ChainFactoryOptions, ae as FieldFactory, a4 as FieldFactoryWithResolve, ag as FieldMeta, a9 as FieldOrOperationType, Z as IChainFactory, aa as InferFieldInput, ab as InferFieldOutput, ah as InferInputO, y as IsAny, a5 as Loom, E as MiddlewareConfig, A as MiddlewareOperation, C as MiddlewareOptions, ad as MutationFactory, a3 as MutationFactoryWithResolve, P as OnlyMemoizationPayload, a8 as OperationType, ac as QueryFactory, a2 as QueryFactoryWithResolve, z as RequireKeys, a0 as ResolvableSubscription, a6 as ResolverOptionsWithParent, K as ResolvingFields, a7 as ResolvingOptions, x as SYMBOLS, af as SubscriptionFactory, a1 as SubscriptionNeedResolve, H as applyMiddlewares, Y as assignContextMap, aj as createInputParser, J as filterMiddlewares, X as getMemoizationMap, L as getResolvingFields, al as getStandardValue, U as isOnlyMemoryPayload, T as onlyMemoization, ak as parseInputValue, N as parseResolvingFields } from './context-D0Bwgtgg.cjs';
|
|
3
3
|
import { GraphQLFieldExtensions, GraphQLScalarType, GraphQLObjectType, GraphQLOutputType, GraphQLNullableType, GraphQLList, GraphQLNonNull, GraphQLObjectTypeConfig, GraphQLUnionType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLFieldMap, GraphQLFieldConfig, GraphQLSchemaConfig, GraphQLNamedType, GraphQLSchema, GraphQLFieldConfigArgumentMap, GraphQLType, GraphQLInputType, GraphQLInterfaceTypeConfig } from 'graphql';
|
|
4
4
|
|
|
5
5
|
declare function getOperationOptions(resolveOrOptions: ((...args: any) => any) | FieldOptions<any, any, any, any> | QueryOptions<any, any> | MutationOptions<any, any>): any;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldOptions, Q as QueryOptions, M as MutationOptions, R as ResolverPayload, S as SubscriptionOptions, G as GraphQLFieldOptions, a as StandardSchemaV1, b as GraphQLSilk, c as MayPromise, d as Query, e as QueryChainFactory, f as QueryFactoryWithChain, g as Mutation, h as MutationChainFactory, i as MutationFactoryWithChain, j as Field, k as FieldChainFactory, l as FieldFactoryWithUtils, m as SubscriptionChainFactory, n as Subscription, o as SubscriptionFactoryWithChain, O as Operation, p as FIELD_HIDDEN, q as ResolverOptionsWithExtensions, r as OmitInUnion, V as ValueOf, s as ResolverOptions, t as FieldOrOperation, u as Resolver, I as IS_RESOLVER, v as Middleware, w as InferInputI, W as WEAVER_CONFIG, B as BaseField } from './context-
|
|
2
|
-
export { $ as BaseChainFactory, ai as CallableInputParser, D as CallableMiddlewareOptions, _ as ChainFactoryOptions, ae as FieldFactory, a4 as FieldFactoryWithResolve, ag as FieldMeta, a9 as FieldOrOperationType, Z as IChainFactory, aa as InferFieldInput, ab as InferFieldOutput, ah as InferInputO, y as IsAny, a5 as Loom, E as MiddlewareConfig, A as MiddlewareOperation, C as MiddlewareOptions, ad as MutationFactory, a3 as MutationFactoryWithResolve, P as OnlyMemoizationPayload, a8 as OperationType, ac as QueryFactory, a2 as QueryFactoryWithResolve, z as RequireKeys, a0 as ResolvableSubscription, a6 as ResolverOptionsWithParent, K as ResolvingFields, a7 as ResolvingOptions, x as SYMBOLS, af as SubscriptionFactory, a1 as SubscriptionNeedResolve, H as applyMiddlewares, Y as assignContextMap, aj as createInputParser, J as filterMiddlewares, X as getMemoizationMap, L as getResolvingFields, al as getStandardValue, U as isOnlyMemoryPayload, T as onlyMemoization, ak as parseInputValue, N as parseResolvingFields } from './context-
|
|
1
|
+
import { F as FieldOptions, Q as QueryOptions, M as MutationOptions, R as ResolverPayload, S as SubscriptionOptions, G as GraphQLFieldOptions, a as StandardSchemaV1, b as GraphQLSilk, c as MayPromise, d as Query, e as QueryChainFactory, f as QueryFactoryWithChain, g as Mutation, h as MutationChainFactory, i as MutationFactoryWithChain, j as Field, k as FieldChainFactory, l as FieldFactoryWithUtils, m as SubscriptionChainFactory, n as Subscription, o as SubscriptionFactoryWithChain, O as Operation, p as FIELD_HIDDEN, q as ResolverOptionsWithExtensions, r as OmitInUnion, V as ValueOf, s as ResolverOptions, t as FieldOrOperation, u as Resolver, I as IS_RESOLVER, v as Middleware, w as InferInputI, W as WEAVER_CONFIG, B as BaseField } from './context-D0Bwgtgg.js';
|
|
2
|
+
export { $ as BaseChainFactory, ai as CallableInputParser, D as CallableMiddlewareOptions, _ as ChainFactoryOptions, ae as FieldFactory, a4 as FieldFactoryWithResolve, ag as FieldMeta, a9 as FieldOrOperationType, Z as IChainFactory, aa as InferFieldInput, ab as InferFieldOutput, ah as InferInputO, y as IsAny, a5 as Loom, E as MiddlewareConfig, A as MiddlewareOperation, C as MiddlewareOptions, ad as MutationFactory, a3 as MutationFactoryWithResolve, P as OnlyMemoizationPayload, a8 as OperationType, ac as QueryFactory, a2 as QueryFactoryWithResolve, z as RequireKeys, a0 as ResolvableSubscription, a6 as ResolverOptionsWithParent, K as ResolvingFields, a7 as ResolvingOptions, x as SYMBOLS, af as SubscriptionFactory, a1 as SubscriptionNeedResolve, H as applyMiddlewares, Y as assignContextMap, aj as createInputParser, J as filterMiddlewares, X as getMemoizationMap, L as getResolvingFields, al as getStandardValue, U as isOnlyMemoryPayload, T as onlyMemoization, ak as parseInputValue, N as parseResolvingFields } from './context-D0Bwgtgg.js';
|
|
3
3
|
import { GraphQLFieldExtensions, GraphQLScalarType, GraphQLObjectType, GraphQLOutputType, GraphQLNullableType, GraphQLList, GraphQLNonNull, GraphQLObjectTypeConfig, GraphQLUnionType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLFieldMap, GraphQLFieldConfig, GraphQLSchemaConfig, GraphQLNamedType, GraphQLSchema, GraphQLFieldConfigArgumentMap, GraphQLType, GraphQLInputType, GraphQLInterfaceTypeConfig } from 'graphql';
|
|
4
4
|
|
|
5
5
|
declare function getOperationOptions(resolveOrOptions: ((...args: any) => any) | FieldOptions<any, any, any, any> | QueryOptions<any, any> | MutationOptions<any, any>): any;
|
package/dist/index.js
CHANGED
|
@@ -832,64 +832,91 @@ var SubscriptionChainFactory = class _SubscriptionChainFactory extends BaseChain
|
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
834
|
var QueryFactoryWithResolve = class _QueryFactoryWithResolve extends BaseChainFactory {
|
|
835
|
-
constructor(
|
|
835
|
+
constructor(outputSilk, options) {
|
|
836
836
|
super(options);
|
|
837
|
-
this.
|
|
837
|
+
this.outputSilk = outputSilk;
|
|
838
838
|
this.options = options;
|
|
839
839
|
}
|
|
840
840
|
get "~meta"() {
|
|
841
|
-
return loom.query(this.
|
|
841
|
+
return loom.query(this.outputSilk, this.options)["~meta"];
|
|
842
842
|
}
|
|
843
843
|
clone(options) {
|
|
844
|
-
return new _QueryFactoryWithResolve(this.
|
|
844
|
+
return new _QueryFactoryWithResolve(this.outputSilk, {
|
|
845
845
|
...this.options,
|
|
846
846
|
...options
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
849
|
input(input) {
|
|
850
|
-
return new _QueryFactoryWithResolve(this.
|
|
850
|
+
return new _QueryFactoryWithResolve(this.outputSilk, {
|
|
851
851
|
...this.options,
|
|
852
852
|
input
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
|
+
output(output, transform) {
|
|
856
|
+
return new _QueryFactoryWithResolve(output, {
|
|
857
|
+
...this.options,
|
|
858
|
+
middlewares: [
|
|
859
|
+
...this.options.middlewares ?? [],
|
|
860
|
+
async (next) => transform(await next())
|
|
861
|
+
]
|
|
862
|
+
});
|
|
863
|
+
}
|
|
855
864
|
};
|
|
856
865
|
var MutationFactoryWithResolve = class _MutationFactoryWithResolve extends BaseChainFactory {
|
|
857
|
-
constructor(
|
|
866
|
+
constructor(outputSilk, options) {
|
|
858
867
|
super(options);
|
|
859
|
-
this.
|
|
868
|
+
this.outputSilk = outputSilk;
|
|
860
869
|
this.options = options;
|
|
861
870
|
}
|
|
862
871
|
get "~meta"() {
|
|
863
|
-
return loom.mutation(this.
|
|
872
|
+
return loom.mutation(this.outputSilk, this.options)["~meta"];
|
|
864
873
|
}
|
|
865
874
|
clone(options) {
|
|
866
|
-
return new _MutationFactoryWithResolve(this.
|
|
875
|
+
return new _MutationFactoryWithResolve(this.outputSilk, {
|
|
867
876
|
...this.options,
|
|
868
877
|
...options
|
|
869
878
|
});
|
|
870
879
|
}
|
|
871
880
|
input(input) {
|
|
872
|
-
return new _MutationFactoryWithResolve(this.
|
|
881
|
+
return new _MutationFactoryWithResolve(this.outputSilk, {
|
|
873
882
|
...this.options,
|
|
874
883
|
input
|
|
875
884
|
});
|
|
876
885
|
}
|
|
886
|
+
output(output, transform) {
|
|
887
|
+
return new _MutationFactoryWithResolve(output, {
|
|
888
|
+
...this.options,
|
|
889
|
+
middlewares: [
|
|
890
|
+
...this.options.middlewares ?? [],
|
|
891
|
+
async (next) => transform(await next())
|
|
892
|
+
]
|
|
893
|
+
});
|
|
894
|
+
}
|
|
877
895
|
};
|
|
878
896
|
var FieldFactoryWithResolve = class _FieldFactoryWithResolve extends BaseChainFactory {
|
|
879
|
-
constructor(
|
|
897
|
+
constructor(outputSilk, options) {
|
|
880
898
|
super(options);
|
|
881
|
-
this.
|
|
899
|
+
this.outputSilk = outputSilk;
|
|
882
900
|
this.options = options;
|
|
883
901
|
}
|
|
884
902
|
get "~meta"() {
|
|
885
|
-
return loom.field(this.
|
|
903
|
+
return loom.field(this.outputSilk, this.options)["~meta"];
|
|
886
904
|
}
|
|
887
905
|
clone(options) {
|
|
888
|
-
return new _FieldFactoryWithResolve(this.
|
|
906
|
+
return new _FieldFactoryWithResolve(this.outputSilk, {
|
|
889
907
|
...this.options,
|
|
890
908
|
...options
|
|
891
909
|
});
|
|
892
910
|
}
|
|
911
|
+
output(output, transform) {
|
|
912
|
+
return new _FieldFactoryWithResolve(output, {
|
|
913
|
+
...this.options,
|
|
914
|
+
middlewares: [
|
|
915
|
+
...this.options.middlewares ?? [],
|
|
916
|
+
async (next) => transform(await next())
|
|
917
|
+
]
|
|
918
|
+
});
|
|
919
|
+
}
|
|
893
920
|
};
|
|
894
921
|
|
|
895
922
|
// src/resolver/resolver.ts
|