@gqloom/core 0.14.4 → 0.15.0

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.
@@ -1,6 +1,6 @@
1
1
  //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (all, symbols) => {
3
+ var __exportAll = (all, symbols) => {
4
4
  let target = {};
5
5
  for (var name in all) {
6
6
  __defProp(target, name, {
@@ -15,4 +15,4 @@ var __export = (all, symbols) => {
15
15
  };
16
16
 
17
17
  //#endregion
18
- export { __export as t };
18
+ export { __exportAll as t };
package/dist/context.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_parse_resolving_fields = require('./parse-resolving-fields-k74tX3i9.cjs');
1
+ const require_parse_resolving_fields = require('./parse-resolving-fields-CJw_nGJ2.cjs');
2
2
  let node_async_hooks = require("node:async_hooks");
3
3
 
4
4
  //#region src/context/async-iterator.ts
@@ -1,4 +1,4 @@
1
- import { Ct as Middleware, Vt as OnlyMemoizationPayload, bn as BaseField, hn as ResolverPayload, ut as ResolvingFields } from "./index-BW7_Sr0t.cjs";
1
+ import { Ct as Middleware, Vt as OnlyMemoizationPayload, bn as BaseField, hn as ResolverPayload, ut as ResolvingFields } from "./index-BstkglTj.cjs";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
 
4
4
  //#region src/context/async-iterator.d.ts
package/dist/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ct as Middleware, Vt as OnlyMemoizationPayload, bn as BaseField, hn as ResolverPayload, ut as ResolvingFields } from "./index-CFo2-jU-.js";
1
+ import { Ct as Middleware, Vt as OnlyMemoizationPayload, bn as BaseField, hn as ResolverPayload, ut as ResolvingFields } from "./index-CrKRwsqN.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
 
4
4
  //#region src/context/async-iterator.d.ts
package/dist/context.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as getMemoizationMap, n as getResolvingFields, o as isOnlyMemoryPayload, s as onlyMemoization } from "./parse-resolving-fields-GAEhHjUw.js";
1
+ import { a as getMemoizationMap, n as getResolvingFields, o as isOnlyMemoryPayload, s as onlyMemoization } from "./parse-resolving-fields-B9xSmxNH.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
 
4
4
  //#region src/context/async-iterator.ts
@@ -2,7 +2,34 @@ import { GraphQLArgument, GraphQLArgumentConfig, GraphQLFieldConfig, GraphQLFiel
2
2
 
3
3
  //#region rolldown:runtime
4
4
  //#endregion
5
- //#region ../../node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.ts
5
+ //#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
6
+ /** The Standard Typed interface. This is a base type extended by other specs. */
7
+ interface StandardTypedV1<Input = unknown, Output = Input> {
8
+ /** The Standard properties. */
9
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
10
+ }
11
+ declare namespace StandardTypedV1 {
12
+ /** The Standard Typed properties interface. */
13
+ interface Props<Input = unknown, Output = Input> {
14
+ /** The version number of the standard. */
15
+ readonly version: 1;
16
+ /** The vendor name of the schema library. */
17
+ readonly vendor: string;
18
+ /** Inferred types associated with the schema. */
19
+ readonly types?: Types<Input, Output> | undefined;
20
+ }
21
+ /** The Standard Typed types interface. */
22
+ interface Types<Input = unknown, Output = Input> {
23
+ /** The input type of the schema. */
24
+ readonly input: Input;
25
+ /** The output type of the schema. */
26
+ readonly output: Output;
27
+ }
28
+ /** Infers the input type of a Standard Typed. */
29
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
30
+ /** Infers the output type of a Standard Typed. */
31
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
32
+ }
6
33
  /** The Standard Schema interface. */
7
34
  interface StandardSchemaV1<Input = unknown, Output = Input> {
8
35
  /** The Standard Schema properties. */
@@ -10,54 +37,86 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
10
37
  }
11
38
  declare namespace StandardSchemaV1 {
12
39
  /** The Standard Schema properties interface. */
13
- export interface Props<Input = unknown, Output = Input> {
14
- /** The version number of the standard. */
15
- readonly version: 1;
16
- /** The vendor name of the schema library. */
17
- readonly vendor: string;
40
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
18
41
  /** Validates unknown input values. */
19
- readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
20
- /** Inferred types associated with the schema. */
21
- readonly types?: Types<Input, Output> | undefined;
42
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
22
43
  }
23
44
  /** The result interface of the validate function. */
24
- export type Result<Output> = SuccessResult<Output> | FailureResult;
45
+ type Result<Output> = SuccessResult<Output> | FailureResult;
25
46
  /** The result interface if validation succeeds. */
26
- export interface SuccessResult<Output> {
47
+ interface SuccessResult<Output> {
27
48
  /** The typed output value. */
28
49
  readonly value: Output;
29
- /** The non-existent issues. */
50
+ /** A falsy value for `issues` indicates success. */
30
51
  readonly issues?: undefined;
31
52
  }
53
+ interface Options {
54
+ /** Explicit support for additional vendor-specific parameters, if needed. */
55
+ readonly libraryOptions?: Record<string, unknown> | undefined;
56
+ }
32
57
  /** The result interface if validation fails. */
33
- export interface FailureResult {
58
+ interface FailureResult {
34
59
  /** The issues of failed validation. */
35
60
  readonly issues: ReadonlyArray<Issue>;
36
61
  }
37
62
  /** The issue interface of the failure output. */
38
- export interface Issue {
63
+ interface Issue {
39
64
  /** The error message of the issue. */
40
65
  readonly message: string;
41
66
  /** The path of the issue, if any. */
42
67
  readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
43
68
  }
44
69
  /** The path segment interface of the issue. */
45
- export interface PathSegment {
70
+ interface PathSegment {
46
71
  /** The key representing a path segment. */
47
72
  readonly key: PropertyKey;
48
73
  }
49
- /** The Standard Schema types interface. */
50
- export interface Types<Input = unknown, Output = Input> {
51
- /** The input type of the schema. */
52
- readonly input: Input;
53
- /** The output type of the schema. */
54
- readonly output: Output;
74
+ /** The Standard types interface. */
75
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
76
+ /** Infers the input type of a Standard. */
77
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
78
+ /** Infers the output type of a Standard. */
79
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
80
+ }
81
+ /** The Standard JSON Schema interface. */
82
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
83
+ /** The Standard JSON Schema properties. */
84
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
85
+ }
86
+ declare namespace StandardJSONSchemaV1 {
87
+ /** The Standard JSON Schema properties interface. */
88
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
89
+ /** Methods for generating the input/output JSON Schema. */
90
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
91
+ }
92
+ /** The Standard JSON Schema converter interface. */
93
+ interface Converter {
94
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
95
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
96
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
97
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
55
98
  }
56
- /** Infers the input type of a Standard Schema. */
57
- export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
58
- /** Infers the output type of a Standard Schema. */
59
- export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
60
- export {};
99
+ /**
100
+ * The target version of the generated JSON Schema.
101
+ *
102
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
103
+ *
104
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
105
+ */
106
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
107
+ /** The options for the input/output methods. */
108
+ interface Options {
109
+ /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
110
+ readonly target: Target;
111
+ /** Explicit support for additional vendor-specific parameters, if needed. */
112
+ readonly libraryOptions?: Record<string, unknown> | undefined;
113
+ }
114
+ /** The Standard types interface. */
115
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
116
+ /** Infers the input type of a Standard. */
117
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
118
+ /** Infers the output type of a Standard. */
119
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
61
120
  }
62
121
  declare namespace symbols_d_exports {
63
122
  export { CONTEXT_MAP_KEY, FIELD_HIDDEN, GET_GRAPHQL_ARGUMENT_CONFIG, GET_GRAPHQL_TYPE, IS_RESOLVER, RESOLVER_OPTIONS_KEY, WEAVER_CONFIG };
@@ -131,7 +190,7 @@ interface IChainFactory<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLS
131
190
  */
132
191
  interface ChainFactoryOptions extends FieldMeta {
133
192
  /** Middleware functions to be applied to the field */
134
- middlewares?: Middleware[];
193
+ middlewares?: Middleware[] | undefined;
135
194
  }
136
195
  /**
137
196
  * Base class for all chain factories
@@ -409,8 +468,8 @@ interface FieldMeta extends GraphQLFieldOptions {
409
468
  operation: "field" | "query" | "mutation" | "subscription";
410
469
  output: GraphQLSilk;
411
470
  input: GraphQLSilk | Record<string, GraphQLSilk> | void;
412
- middlewares?: Middleware[];
413
- dependencies?: string[];
471
+ middlewares?: Middleware[] | undefined;
472
+ dependencies?: string[] | undefined;
414
473
  resolve: (...args: any) => MayPromise<any>;
415
474
  }
416
475
  interface BaseField {
@@ -421,11 +480,11 @@ interface Field<TParent$1 extends GraphQLSilk, TOutput$1 extends GraphQLSilk, TI
421
480
  operation: "field";
422
481
  output: TOutput$1;
423
482
  input: TInput$1;
424
- middlewares?: Middleware[];
483
+ middlewares?: Middleware[] | undefined;
425
484
  dependencies?: TDependencies$1;
426
485
  types?: {
427
486
  parent: ReSilk<TParent$1>;
428
- };
487
+ } | undefined;
429
488
  resolve: (parent: StandardSchemaV1.InferOutput<NonNullable<TParent$1>>, input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
430
489
  } & GraphQLFieldOptions;
431
490
  }
@@ -435,7 +494,7 @@ interface Query<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Re
435
494
  parent?: undefined;
436
495
  output: TOutput$1;
437
496
  input: TInput$1;
438
- middlewares?: Middleware[];
497
+ middlewares?: Middleware[] | undefined;
439
498
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
440
499
  } & GraphQLFieldOptions;
441
500
  }
@@ -445,7 +504,7 @@ interface Mutation<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk |
445
504
  parent?: undefined;
446
505
  output: TOutput$1;
447
506
  input: TInput$1;
448
- middlewares?: Middleware[];
507
+ middlewares?: Middleware[] | undefined;
449
508
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
450
509
  } & GraphQLFieldOptions;
451
510
  }
@@ -455,10 +514,10 @@ interface Subscription<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSi
455
514
  parent?: undefined;
456
515
  output: TOutput$1;
457
516
  input: TInput$1;
458
- middlewares?: Middleware[];
459
- types?: {
517
+ middlewares?: Middleware[] | undefined;
518
+ types?: ({
460
519
  value: TValue;
461
- } & GraphQLFieldOptions;
520
+ } & GraphQLFieldOptions) | undefined;
462
521
  resolve: (value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | void) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
463
522
  subscribe: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => MayPromise<AsyncIterator<TValue>>;
464
523
  } & GraphQLFieldOptions;
@@ -467,8 +526,8 @@ interface Resolver {
467
526
  readonly "~meta": {
468
527
  [IS_RESOLVER]: true;
469
528
  fields: Record<string, BaseField | typeof FIELD_HIDDEN>;
470
- options?: ResolverOptionsWithExtensions<any>;
471
- parent?: GraphQLSilk;
529
+ options?: ResolverOptionsWithExtensions<any> | undefined;
530
+ parent?: GraphQLSilk | undefined;
472
531
  };
473
532
  }
474
533
  type Operation = Query<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void> | Mutation<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void> | Subscription<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void, any>;
@@ -487,11 +546,11 @@ interface GraphQLSilk<TOutput$1 = any, TInput$1 = any> extends StandardSchemaV1<
487
546
  [GET_GRAPHQL_ARGUMENT_CONFIG]?: MayGetter<Omit<GraphQLArgumentConfig, "type" | "astNode"> | undefined>;
488
547
  }
489
548
  interface ResolverOptions<TField extends FieldOrOperation = FieldOrOperation> {
490
- middlewares?: Middleware<TField>[];
549
+ middlewares?: Middleware<TField>[] | undefined;
491
550
  }
492
551
  interface ResolverOptionsWithExtensions<TField extends FieldOrOperation = FieldOrOperation> extends ResolverOptions<TField>, Pick<GraphQLObjectTypeConfig<any, any>, "extensions"> {}
493
552
  interface ResolverOptionsWithParent<TField extends FieldOrOperation = FieldOrOperation> extends ResolverOptionsWithExtensions<TField> {
494
- parent?: TField extends Field<infer TParent, any, any, any> ? TParent : undefined;
553
+ parent?: (TField extends Field<infer TParent, any, any, any> ? TParent : undefined) | undefined;
495
554
  }
496
555
  interface ResolvingOptions extends Pick<ResolverOptions, "middlewares"> {
497
556
  payload: ResolverPayload | undefined;
@@ -505,14 +564,14 @@ type InferFieldOutput<TField extends BaseField> = TField["~meta"]["output"];
505
564
  * Options for creating a GraphQL Query.
506
565
  */
507
566
  interface QueryOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | void = void> extends ResolverOptions<Query<TOutput$1, TInput$1>>, GraphQLFieldOptions {
508
- input?: TInput$1;
567
+ input?: TInput$1 | undefined;
509
568
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
510
569
  }
511
570
  /**
512
571
  * Options for creating a GraphQL Mutation.
513
572
  */
514
573
  interface MutationOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined> extends ResolverOptions<Mutation<TOutput$1, TInput$1>>, GraphQLFieldOptions {
515
- input?: TInput$1;
574
+ input?: TInput$1 | undefined;
516
575
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
517
576
  }
518
577
  /**
@@ -540,8 +599,8 @@ interface MutationFactoryWithChain extends MutationFactory, MutationChainFactory
540
599
  * Options for External Filed of existing GraphQL Object.
541
600
  */
542
601
  interface FieldOptions<TParent$1 extends GraphQLSilk, TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | void = void, TDependencies$1 extends string[] | undefined = undefined> extends ResolverOptions<Field<TParent$1, TOutput$1, TInput$1, TDependencies$1>>, GraphQLFieldOptions {
543
- input?: TInput$1;
544
- dependencies?: TDependencies$1;
602
+ input?: TInput$1 | undefined;
603
+ dependencies?: TDependencies$1 | undefined;
545
604
  resolve: (parent: TDependencies$1 extends string[] ? RequireKeys<NonNullable<StandardSchemaV1.InferOutput<TParent$1>>, TDependencies$1[number]> : NonNullable<StandardSchemaV1.InferOutput<TParent$1>>, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
546
605
  }
547
606
  /**
@@ -570,9 +629,9 @@ interface FieldFactoryWithUtils extends FieldFactory, FieldChainFactory<never, u
570
629
  * Options for creating a GraphQL Subscription.
571
630
  */
572
631
  interface SubscriptionOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput$1>> extends ResolverOptions<Subscription<TOutput$1, TInput$1, TValue>>, GraphQLFieldOptions {
573
- input?: TInput$1;
632
+ input?: TInput$1 | undefined;
574
633
  subscribe: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<AsyncIterator<TValue>>;
575
- resolve?: (value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
634
+ resolve?: ((value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>) | undefined;
576
635
  }
577
636
  /**
578
637
  * Function to create a GraphQL subscription.
@@ -1312,4 +1371,4 @@ declare class GraphQLSchemaLoom {
1312
1371
  */
1313
1372
  declare const weave: typeof GraphQLSchemaLoom.weave;
1314
1373
  //#endregion
1315
- export { resolver as $, FieldOptions as $t, getGraphQLArgumentConfig as A, BaseChainFactory as An, MayGetter as At, ObjectChainResolver as B, SubscriptionChainFactory as Bn, tryIn as Bt, DirectiveItem as C, FieldOrOperation as Cn, Middleware as Ct, ListSilk as D, Resolver as Dn, applyMiddlewares as Dt, GQLoomExtensions as E, Query as En, MiddlewareOptions as Et, nullableSilk as F, MutationChainFactory as Fn, BatchLoadFn as Ft, createMutation as G, onlyMemoization as Gt, ResolverMeta as H, symbols_d_exports as Hn, assignContextMap as Ht, parseSilk as I, MutationFactoryWithResolve as In, EasyDataLoader as It, defaultSubscriptionResolve as J, getFieldOptions as Jt, createQuery as K, AUTO_ALIASING as Kt, silk as L, QueryChainFactory as Ln, LoomDataLoader as Lt, isSilk as M, FieldChainFactory as Mn, OmitInUnion as Mt, listSilk as N, FieldFactoryWithResolve as Nn, RequireKeys as Nt, NonNullSilk as O, Subscription as On, filterMiddlewares as Ot, nonNullSilk as P, IChainFactory as Pn, ValueOf as Pt, query$1 as Q, FieldFactoryWithUtils as Qt, ChainResolver as R, QueryFactoryWithResolve as Rn, markErrorLocation as Rt, inputToArgs as S, FieldMeta as Sn, CallableMiddlewareOptions as St, GQLoomExtensionAttribute as T, Operation as Tn, MiddlewareOperation as Tt, ToExecutorProps as U, StandardSchemaV1 as Un, getMemoizationMap as Ut, ResolverFactory as V, SubscriptionNeedResolve as Vn, OnlyMemoizationPayload as Vt, createField as W, isOnlyMemoryPayload as Wt, loom as X, getSubscriptionOptions as Xt, field as Y, getOperationOptions as Yt, mutation$1 as Z, FieldFactory as Zt, SchemaWeaver as _, SubscriptionFactory as _n, meta as _t, LoomObjectType as a, MutationFactory as an, getStandardValue as at, ensureInputObjectType as b, BaseField as bn, toFieldMap as bt, AliasList as c, OperationType as cn, pascalCase as ct, WeaverContext as d, QueryOptions as dn, ResolvingFieldsOptions as dt, FieldOrOperationType as en, subscription$1 as et, collectName as f, ResolverOptions as fn, getDeepResolvingFields as ft, weaverContext as g, ResolvingOptions as gn, mapValue as gt, provideWeaverContext as h, ResolverPayload as hn, deepMerge as ht, CoreSchemaWeaverConfigOptions as i, InferFieldOutput as in, createInputParser as it, getGraphQLType as j, ChainFactoryOptions as jn, MayPromise as jt, NullableSilk as k, types_loom_d_exports as kn, IsAny as kt, GlobalWeaverContext as l, QueryFactory as ln, screamingSnakeCase as lt, initWeaverContext as m, ResolverOptionsWithParent as mn, parseResolvingFields as mt, weave as n, GraphQLSilk as nn, InferInputI as nt, OPERATION_OBJECT_NAMES as o, MutationFactoryWithChain as on, parseInputValue as ot, collectNames as p, ResolverOptionsWithExtensions as pn, getResolvingFields as pt, createSubscription as q, DERIVED_DEPENDENCIES as qt, CoreSchemaWeaverConfig as r, InferFieldInput as rn, InferInputO as rt, getCacheType as s, MutationOptions as sn, capitalize as st, GraphQLSchemaLoom as t, GraphQLFieldOptions as tn, CallableInputParser as tt, WeaverConfig as u, QueryFactoryWithChain as un, ResolvingFields as ut, isSchemaVendorWeaver as v, SubscriptionFactoryWithChain as vn, notNullish as vt, DirectiveRecord as w, Mutation as wn, MiddlewareConfig as wt, ensureInputType as x, Field as xn, toObjMap as xt, ensureInterfaceType as y, SubscriptionOptions as yn, toArguments as yt, Executor as z, ResolvableSubscription as zn, markLocation as zt };
1374
+ export { resolver as $, FieldOptions as $t, getGraphQLArgumentConfig as A, BaseChainFactory as An, MayGetter as At, ObjectChainResolver as B, SubscriptionChainFactory as Bn, tryIn as Bt, DirectiveItem as C, FieldOrOperation as Cn, Middleware as Ct, ListSilk as D, Resolver as Dn, applyMiddlewares as Dt, GQLoomExtensions as E, Query as En, MiddlewareOptions as Et, nullableSilk as F, MutationChainFactory as Fn, BatchLoadFn as Ft, createMutation as G, StandardTypedV1 as Gn, onlyMemoization as Gt, ResolverMeta as H, symbols_d_exports as Hn, assignContextMap as Ht, parseSilk as I, MutationFactoryWithResolve as In, EasyDataLoader as It, defaultSubscriptionResolve as J, getFieldOptions as Jt, createQuery as K, AUTO_ALIASING as Kt, silk as L, QueryChainFactory as Ln, LoomDataLoader as Lt, isSilk as M, FieldChainFactory as Mn, OmitInUnion as Mt, listSilk as N, FieldFactoryWithResolve as Nn, RequireKeys as Nt, NonNullSilk as O, Subscription as On, filterMiddlewares as Ot, nonNullSilk as P, IChainFactory as Pn, ValueOf as Pt, query$1 as Q, FieldFactoryWithUtils as Qt, ChainResolver as R, QueryFactoryWithResolve as Rn, markErrorLocation as Rt, inputToArgs as S, FieldMeta as Sn, CallableMiddlewareOptions as St, GQLoomExtensionAttribute as T, Operation as Tn, MiddlewareOperation as Tt, ToExecutorProps as U, StandardJSONSchemaV1 as Un, getMemoizationMap as Ut, ResolverFactory as V, SubscriptionNeedResolve as Vn, OnlyMemoizationPayload as Vt, createField as W, StandardSchemaV1 as Wn, isOnlyMemoryPayload as Wt, loom as X, getSubscriptionOptions as Xt, field as Y, getOperationOptions as Yt, mutation$1 as Z, FieldFactory as Zt, SchemaWeaver as _, SubscriptionFactory as _n, meta as _t, LoomObjectType as a, MutationFactory as an, getStandardValue as at, ensureInputObjectType as b, BaseField as bn, toFieldMap as bt, AliasList as c, OperationType as cn, pascalCase as ct, WeaverContext as d, QueryOptions as dn, ResolvingFieldsOptions as dt, FieldOrOperationType as en, subscription$1 as et, collectName as f, ResolverOptions as fn, getDeepResolvingFields as ft, weaverContext as g, ResolvingOptions as gn, mapValue as gt, provideWeaverContext as h, ResolverPayload as hn, deepMerge as ht, CoreSchemaWeaverConfigOptions as i, InferFieldOutput as in, createInputParser as it, getGraphQLType as j, ChainFactoryOptions as jn, MayPromise as jt, NullableSilk as k, types_loom_d_exports as kn, IsAny as kt, GlobalWeaverContext as l, QueryFactory as ln, screamingSnakeCase as lt, initWeaverContext as m, ResolverOptionsWithParent as mn, parseResolvingFields as mt, weave as n, GraphQLSilk as nn, InferInputI as nt, OPERATION_OBJECT_NAMES as o, MutationFactoryWithChain as on, parseInputValue as ot, collectNames as p, ResolverOptionsWithExtensions as pn, getResolvingFields as pt, createSubscription as q, DERIVED_DEPENDENCIES as qt, CoreSchemaWeaverConfig as r, InferFieldInput as rn, InferInputO as rt, getCacheType as s, MutationOptions as sn, capitalize as st, GraphQLSchemaLoom as t, GraphQLFieldOptions as tn, CallableInputParser as tt, WeaverConfig as u, QueryFactoryWithChain as un, ResolvingFields as ut, isSchemaVendorWeaver as v, SubscriptionFactoryWithChain as vn, notNullish as vt, DirectiveRecord as w, Mutation as wn, MiddlewareConfig as wt, ensureInputType as x, Field as xn, toObjMap as xt, ensureInterfaceType as y, SubscriptionOptions as yn, toArguments as yt, Executor as z, ResolvableSubscription as zn, markLocation as zt };
@@ -1,6 +1,33 @@
1
1
  import { GraphQLArgument, GraphQLArgumentConfig, GraphQLFieldConfig, GraphQLFieldConfigArgumentMap, GraphQLFieldExtensions, GraphQLFieldMap, GraphQLInputObjectType, GraphQLInputType, GraphQLInterfaceType, GraphQLInterfaceTypeConfig, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLNullableType, GraphQLObjectType, GraphQLObjectTypeConfig, GraphQLOutputType, GraphQLResolveInfo, GraphQLScalarType, GraphQLSchema, GraphQLSchemaConfig, GraphQLType, GraphQLUnionType } from "graphql";
2
2
 
3
- //#region ../../node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.ts
3
+ //#region ../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts
4
+ /** The Standard Typed interface. This is a base type extended by other specs. */
5
+ interface StandardTypedV1<Input = unknown, Output = Input> {
6
+ /** The Standard properties. */
7
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
8
+ }
9
+ declare namespace StandardTypedV1 {
10
+ /** The Standard Typed properties interface. */
11
+ interface Props<Input = unknown, Output = Input> {
12
+ /** The version number of the standard. */
13
+ readonly version: 1;
14
+ /** The vendor name of the schema library. */
15
+ readonly vendor: string;
16
+ /** Inferred types associated with the schema. */
17
+ readonly types?: Types<Input, Output> | undefined;
18
+ }
19
+ /** The Standard Typed types interface. */
20
+ interface Types<Input = unknown, Output = Input> {
21
+ /** The input type of the schema. */
22
+ readonly input: Input;
23
+ /** The output type of the schema. */
24
+ readonly output: Output;
25
+ }
26
+ /** Infers the input type of a Standard Typed. */
27
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
28
+ /** Infers the output type of a Standard Typed. */
29
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
30
+ }
4
31
  /** The Standard Schema interface. */
5
32
  interface StandardSchemaV1<Input = unknown, Output = Input> {
6
33
  /** The Standard Schema properties. */
@@ -8,54 +35,86 @@ interface StandardSchemaV1<Input = unknown, Output = Input> {
8
35
  }
9
36
  declare namespace StandardSchemaV1 {
10
37
  /** The Standard Schema properties interface. */
11
- export interface Props<Input = unknown, Output = Input> {
12
- /** The version number of the standard. */
13
- readonly version: 1;
14
- /** The vendor name of the schema library. */
15
- readonly vendor: string;
38
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
16
39
  /** Validates unknown input values. */
17
- readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
18
- /** Inferred types associated with the schema. */
19
- readonly types?: Types<Input, Output> | undefined;
40
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
20
41
  }
21
42
  /** The result interface of the validate function. */
22
- export type Result<Output> = SuccessResult<Output> | FailureResult;
43
+ type Result<Output> = SuccessResult<Output> | FailureResult;
23
44
  /** The result interface if validation succeeds. */
24
- export interface SuccessResult<Output> {
45
+ interface SuccessResult<Output> {
25
46
  /** The typed output value. */
26
47
  readonly value: Output;
27
- /** The non-existent issues. */
48
+ /** A falsy value for `issues` indicates success. */
28
49
  readonly issues?: undefined;
29
50
  }
51
+ interface Options {
52
+ /** Explicit support for additional vendor-specific parameters, if needed. */
53
+ readonly libraryOptions?: Record<string, unknown> | undefined;
54
+ }
30
55
  /** The result interface if validation fails. */
31
- export interface FailureResult {
56
+ interface FailureResult {
32
57
  /** The issues of failed validation. */
33
58
  readonly issues: ReadonlyArray<Issue>;
34
59
  }
35
60
  /** The issue interface of the failure output. */
36
- export interface Issue {
61
+ interface Issue {
37
62
  /** The error message of the issue. */
38
63
  readonly message: string;
39
64
  /** The path of the issue, if any. */
40
65
  readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
41
66
  }
42
67
  /** The path segment interface of the issue. */
43
- export interface PathSegment {
68
+ interface PathSegment {
44
69
  /** The key representing a path segment. */
45
70
  readonly key: PropertyKey;
46
71
  }
47
- /** The Standard Schema types interface. */
48
- export interface Types<Input = unknown, Output = Input> {
49
- /** The input type of the schema. */
50
- readonly input: Input;
51
- /** The output type of the schema. */
52
- readonly output: Output;
72
+ /** The Standard types interface. */
73
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
74
+ /** Infers the input type of a Standard. */
75
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
76
+ /** Infers the output type of a Standard. */
77
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
78
+ }
79
+ /** The Standard JSON Schema interface. */
80
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
81
+ /** The Standard JSON Schema properties. */
82
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
83
+ }
84
+ declare namespace StandardJSONSchemaV1 {
85
+ /** The Standard JSON Schema properties interface. */
86
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
87
+ /** Methods for generating the input/output JSON Schema. */
88
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
89
+ }
90
+ /** The Standard JSON Schema converter interface. */
91
+ interface Converter {
92
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
93
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
94
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
95
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
53
96
  }
54
- /** Infers the input type of a Standard Schema. */
55
- export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
56
- /** Infers the output type of a Standard Schema. */
57
- export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
58
- export {};
97
+ /**
98
+ * The target version of the generated JSON Schema.
99
+ *
100
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
101
+ *
102
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
103
+ */
104
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
105
+ /** The options for the input/output methods. */
106
+ interface Options {
107
+ /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
108
+ readonly target: Target;
109
+ /** Explicit support for additional vendor-specific parameters, if needed. */
110
+ readonly libraryOptions?: Record<string, unknown> | undefined;
111
+ }
112
+ /** The Standard types interface. */
113
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
114
+ /** Infers the input type of a Standard. */
115
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
116
+ /** Infers the output type of a Standard. */
117
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
59
118
  }
60
119
  declare namespace symbols_d_exports {
61
120
  export { CONTEXT_MAP_KEY, FIELD_HIDDEN, GET_GRAPHQL_ARGUMENT_CONFIG, GET_GRAPHQL_TYPE, IS_RESOLVER, RESOLVER_OPTIONS_KEY, WEAVER_CONFIG };
@@ -129,7 +188,7 @@ interface IChainFactory<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLS
129
188
  */
130
189
  interface ChainFactoryOptions extends FieldMeta {
131
190
  /** Middleware functions to be applied to the field */
132
- middlewares?: Middleware[];
191
+ middlewares?: Middleware[] | undefined;
133
192
  }
134
193
  /**
135
194
  * Base class for all chain factories
@@ -407,8 +466,8 @@ interface FieldMeta extends GraphQLFieldOptions {
407
466
  operation: "field" | "query" | "mutation" | "subscription";
408
467
  output: GraphQLSilk;
409
468
  input: GraphQLSilk | Record<string, GraphQLSilk> | void;
410
- middlewares?: Middleware[];
411
- dependencies?: string[];
469
+ middlewares?: Middleware[] | undefined;
470
+ dependencies?: string[] | undefined;
412
471
  resolve: (...args: any) => MayPromise<any>;
413
472
  }
414
473
  interface BaseField {
@@ -419,11 +478,11 @@ interface Field<TParent$1 extends GraphQLSilk, TOutput$1 extends GraphQLSilk, TI
419
478
  operation: "field";
420
479
  output: TOutput$1;
421
480
  input: TInput$1;
422
- middlewares?: Middleware[];
481
+ middlewares?: Middleware[] | undefined;
423
482
  dependencies?: TDependencies$1;
424
483
  types?: {
425
484
  parent: ReSilk<TParent$1>;
426
- };
485
+ } | undefined;
427
486
  resolve: (parent: StandardSchemaV1.InferOutput<NonNullable<TParent$1>>, input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
428
487
  } & GraphQLFieldOptions;
429
488
  }
@@ -433,7 +492,7 @@ interface Query<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Re
433
492
  parent?: undefined;
434
493
  output: TOutput$1;
435
494
  input: TInput$1;
436
- middlewares?: Middleware[];
495
+ middlewares?: Middleware[] | undefined;
437
496
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
438
497
  } & GraphQLFieldOptions;
439
498
  }
@@ -443,7 +502,7 @@ interface Mutation<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk |
443
502
  parent?: undefined;
444
503
  output: TOutput$1;
445
504
  input: TInput$1;
446
- middlewares?: Middleware[];
505
+ middlewares?: Middleware[] | undefined;
447
506
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => Promise<StandardSchemaV1.InferOutput<TOutput$1>>;
448
507
  } & GraphQLFieldOptions;
449
508
  }
@@ -453,10 +512,10 @@ interface Subscription<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSi
453
512
  parent?: undefined;
454
513
  output: TOutput$1;
455
514
  input: TInput$1;
456
- middlewares?: Middleware[];
457
- types?: {
515
+ middlewares?: Middleware[] | undefined;
516
+ types?: ({
458
517
  value: TValue;
459
- } & GraphQLFieldOptions;
518
+ } & GraphQLFieldOptions) | undefined;
460
519
  resolve: (value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | void) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
461
520
  subscribe: (input: InferInputO<TInput$1>, payload: ResolverPayload | void) => MayPromise<AsyncIterator<TValue>>;
462
521
  } & GraphQLFieldOptions;
@@ -465,8 +524,8 @@ interface Resolver {
465
524
  readonly "~meta": {
466
525
  [IS_RESOLVER]: true;
467
526
  fields: Record<string, BaseField | typeof FIELD_HIDDEN>;
468
- options?: ResolverOptionsWithExtensions<any>;
469
- parent?: GraphQLSilk;
527
+ options?: ResolverOptionsWithExtensions<any> | undefined;
528
+ parent?: GraphQLSilk | undefined;
470
529
  };
471
530
  }
472
531
  type Operation = Query<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void> | Mutation<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void> | Subscription<GraphQLSilk, GraphQLSilk | Record<string, GraphQLSilk> | void, any>;
@@ -485,11 +544,11 @@ interface GraphQLSilk<TOutput$1 = any, TInput$1 = any> extends StandardSchemaV1<
485
544
  [GET_GRAPHQL_ARGUMENT_CONFIG]?: MayGetter<Omit<GraphQLArgumentConfig, "type" | "astNode"> | undefined>;
486
545
  }
487
546
  interface ResolverOptions<TField extends FieldOrOperation = FieldOrOperation> {
488
- middlewares?: Middleware<TField>[];
547
+ middlewares?: Middleware<TField>[] | undefined;
489
548
  }
490
549
  interface ResolverOptionsWithExtensions<TField extends FieldOrOperation = FieldOrOperation> extends ResolverOptions<TField>, Pick<GraphQLObjectTypeConfig<any, any>, "extensions"> {}
491
550
  interface ResolverOptionsWithParent<TField extends FieldOrOperation = FieldOrOperation> extends ResolverOptionsWithExtensions<TField> {
492
- parent?: TField extends Field<infer TParent, any, any, any> ? TParent : undefined;
551
+ parent?: (TField extends Field<infer TParent, any, any, any> ? TParent : undefined) | undefined;
493
552
  }
494
553
  interface ResolvingOptions extends Pick<ResolverOptions, "middlewares"> {
495
554
  payload: ResolverPayload | undefined;
@@ -503,14 +562,14 @@ type InferFieldOutput<TField extends BaseField> = TField["~meta"]["output"];
503
562
  * Options for creating a GraphQL Query.
504
563
  */
505
564
  interface QueryOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | void = void> extends ResolverOptions<Query<TOutput$1, TInput$1>>, GraphQLFieldOptions {
506
- input?: TInput$1;
565
+ input?: TInput$1 | undefined;
507
566
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
508
567
  }
509
568
  /**
510
569
  * Options for creating a GraphQL Mutation.
511
570
  */
512
571
  interface MutationOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined> extends ResolverOptions<Mutation<TOutput$1, TInput$1>>, GraphQLFieldOptions {
513
- input?: TInput$1;
572
+ input?: TInput$1 | undefined;
514
573
  resolve: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
515
574
  }
516
575
  /**
@@ -538,8 +597,8 @@ interface MutationFactoryWithChain extends MutationFactory, MutationChainFactory
538
597
  * Options for External Filed of existing GraphQL Object.
539
598
  */
540
599
  interface FieldOptions<TParent$1 extends GraphQLSilk, TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | void = void, TDependencies$1 extends string[] | undefined = undefined> extends ResolverOptions<Field<TParent$1, TOutput$1, TInput$1, TDependencies$1>>, GraphQLFieldOptions {
541
- input?: TInput$1;
542
- dependencies?: TDependencies$1;
600
+ input?: TInput$1 | undefined;
601
+ dependencies?: TDependencies$1 | undefined;
543
602
  resolve: (parent: TDependencies$1 extends string[] ? RequireKeys<NonNullable<StandardSchemaV1.InferOutput<TParent$1>>, TDependencies$1[number]> : NonNullable<StandardSchemaV1.InferOutput<TParent$1>>, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
544
603
  }
545
604
  /**
@@ -568,9 +627,9 @@ interface FieldFactoryWithUtils extends FieldFactory, FieldChainFactory<never, u
568
627
  * Options for creating a GraphQL Subscription.
569
628
  */
570
629
  interface SubscriptionOptions<TOutput$1 extends GraphQLSilk, TInput$1 extends GraphQLSilk | Record<string, GraphQLSilk> | undefined = undefined, TValue = StandardSchemaV1.InferOutput<TOutput$1>> extends ResolverOptions<Subscription<TOutput$1, TInput$1, TValue>>, GraphQLFieldOptions {
571
- input?: TInput$1;
630
+ input?: TInput$1 | undefined;
572
631
  subscribe: (input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<AsyncIterator<TValue>>;
573
- resolve?: (value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>;
632
+ resolve?: ((value: TValue, input: InferInputO<TInput$1>, payload: ResolverPayload | undefined) => MayPromise<StandardSchemaV1.InferOutput<TOutput$1>>) | undefined;
574
633
  }
575
634
  /**
576
635
  * Function to create a GraphQL subscription.
@@ -1310,4 +1369,4 @@ declare class GraphQLSchemaLoom {
1310
1369
  */
1311
1370
  declare const weave: typeof GraphQLSchemaLoom.weave;
1312
1371
  //#endregion
1313
- export { resolver as $, FieldOptions as $t, getGraphQLArgumentConfig as A, BaseChainFactory as An, MayGetter as At, ObjectChainResolver as B, SubscriptionChainFactory as Bn, tryIn as Bt, DirectiveItem as C, FieldOrOperation as Cn, Middleware as Ct, ListSilk as D, Resolver as Dn, applyMiddlewares as Dt, GQLoomExtensions as E, Query as En, MiddlewareOptions as Et, nullableSilk as F, MutationChainFactory as Fn, BatchLoadFn as Ft, createMutation as G, onlyMemoization as Gt, ResolverMeta as H, symbols_d_exports as Hn, assignContextMap as Ht, parseSilk as I, MutationFactoryWithResolve as In, EasyDataLoader as It, defaultSubscriptionResolve as J, getFieldOptions as Jt, createQuery as K, AUTO_ALIASING as Kt, silk as L, QueryChainFactory as Ln, LoomDataLoader as Lt, isSilk as M, FieldChainFactory as Mn, OmitInUnion as Mt, listSilk as N, FieldFactoryWithResolve as Nn, RequireKeys as Nt, NonNullSilk as O, Subscription as On, filterMiddlewares as Ot, nonNullSilk as P, IChainFactory as Pn, ValueOf as Pt, query$1 as Q, FieldFactoryWithUtils as Qt, ChainResolver as R, QueryFactoryWithResolve as Rn, markErrorLocation as Rt, inputToArgs as S, FieldMeta as Sn, CallableMiddlewareOptions as St, GQLoomExtensionAttribute as T, Operation as Tn, MiddlewareOperation as Tt, ToExecutorProps as U, StandardSchemaV1 as Un, getMemoizationMap as Ut, ResolverFactory as V, SubscriptionNeedResolve as Vn, OnlyMemoizationPayload as Vt, createField as W, isOnlyMemoryPayload as Wt, loom as X, getSubscriptionOptions as Xt, field as Y, getOperationOptions as Yt, mutation$1 as Z, FieldFactory as Zt, SchemaWeaver as _, SubscriptionFactory as _n, meta as _t, LoomObjectType as a, MutationFactory as an, getStandardValue as at, ensureInputObjectType as b, BaseField as bn, toFieldMap as bt, AliasList as c, OperationType as cn, pascalCase as ct, WeaverContext as d, QueryOptions as dn, ResolvingFieldsOptions as dt, FieldOrOperationType as en, subscription$1 as et, collectName as f, ResolverOptions as fn, getDeepResolvingFields as ft, weaverContext as g, ResolvingOptions as gn, mapValue as gt, provideWeaverContext as h, ResolverPayload as hn, deepMerge as ht, CoreSchemaWeaverConfigOptions as i, InferFieldOutput as in, createInputParser as it, getGraphQLType as j, ChainFactoryOptions as jn, MayPromise as jt, NullableSilk as k, types_loom_d_exports as kn, IsAny as kt, GlobalWeaverContext as l, QueryFactory as ln, screamingSnakeCase as lt, initWeaverContext as m, ResolverOptionsWithParent as mn, parseResolvingFields as mt, weave as n, GraphQLSilk as nn, InferInputI as nt, OPERATION_OBJECT_NAMES as o, MutationFactoryWithChain as on, parseInputValue as ot, collectNames as p, ResolverOptionsWithExtensions as pn, getResolvingFields as pt, createSubscription as q, DERIVED_DEPENDENCIES as qt, CoreSchemaWeaverConfig as r, InferFieldInput as rn, InferInputO as rt, getCacheType as s, MutationOptions as sn, capitalize as st, GraphQLSchemaLoom as t, GraphQLFieldOptions as tn, CallableInputParser as tt, WeaverConfig as u, QueryFactoryWithChain as un, ResolvingFields as ut, isSchemaVendorWeaver as v, SubscriptionFactoryWithChain as vn, notNullish as vt, DirectiveRecord as w, Mutation as wn, MiddlewareConfig as wt, ensureInputType as x, Field as xn, toObjMap as xt, ensureInterfaceType as y, SubscriptionOptions as yn, toArguments as yt, Executor as z, ResolvableSubscription as zn, markLocation as zt };
1372
+ export { resolver as $, FieldOptions as $t, getGraphQLArgumentConfig as A, BaseChainFactory as An, MayGetter as At, ObjectChainResolver as B, SubscriptionChainFactory as Bn, tryIn as Bt, DirectiveItem as C, FieldOrOperation as Cn, Middleware as Ct, ListSilk as D, Resolver as Dn, applyMiddlewares as Dt, GQLoomExtensions as E, Query as En, MiddlewareOptions as Et, nullableSilk as F, MutationChainFactory as Fn, BatchLoadFn as Ft, createMutation as G, StandardTypedV1 as Gn, onlyMemoization as Gt, ResolverMeta as H, symbols_d_exports as Hn, assignContextMap as Ht, parseSilk as I, MutationFactoryWithResolve as In, EasyDataLoader as It, defaultSubscriptionResolve as J, getFieldOptions as Jt, createQuery as K, AUTO_ALIASING as Kt, silk as L, QueryChainFactory as Ln, LoomDataLoader as Lt, isSilk as M, FieldChainFactory as Mn, OmitInUnion as Mt, listSilk as N, FieldFactoryWithResolve as Nn, RequireKeys as Nt, NonNullSilk as O, Subscription as On, filterMiddlewares as Ot, nonNullSilk as P, IChainFactory as Pn, ValueOf as Pt, query$1 as Q, FieldFactoryWithUtils as Qt, ChainResolver as R, QueryFactoryWithResolve as Rn, markErrorLocation as Rt, inputToArgs as S, FieldMeta as Sn, CallableMiddlewareOptions as St, GQLoomExtensionAttribute as T, Operation as Tn, MiddlewareOperation as Tt, ToExecutorProps as U, StandardJSONSchemaV1 as Un, getMemoizationMap as Ut, ResolverFactory as V, SubscriptionNeedResolve as Vn, OnlyMemoizationPayload as Vt, createField as W, StandardSchemaV1 as Wn, isOnlyMemoryPayload as Wt, loom as X, getSubscriptionOptions as Xt, field as Y, getOperationOptions as Yt, mutation$1 as Z, FieldFactory as Zt, SchemaWeaver as _, SubscriptionFactory as _n, meta as _t, LoomObjectType as a, MutationFactory as an, getStandardValue as at, ensureInputObjectType as b, BaseField as bn, toFieldMap as bt, AliasList as c, OperationType as cn, pascalCase as ct, WeaverContext as d, QueryOptions as dn, ResolvingFieldsOptions as dt, FieldOrOperationType as en, subscription$1 as et, collectName as f, ResolverOptions as fn, getDeepResolvingFields as ft, weaverContext as g, ResolvingOptions as gn, mapValue as gt, provideWeaverContext as h, ResolverPayload as hn, deepMerge as ht, CoreSchemaWeaverConfigOptions as i, InferFieldOutput as in, createInputParser as it, getGraphQLType as j, ChainFactoryOptions as jn, MayPromise as jt, NullableSilk as k, types_loom_d_exports as kn, IsAny as kt, GlobalWeaverContext as l, QueryFactory as ln, screamingSnakeCase as lt, initWeaverContext as m, ResolverOptionsWithParent as mn, parseResolvingFields as mt, weave as n, GraphQLSilk as nn, InferInputI as nt, OPERATION_OBJECT_NAMES as o, MutationFactoryWithChain as on, parseInputValue as ot, collectNames as p, ResolverOptionsWithExtensions as pn, getResolvingFields as pt, createSubscription as q, DERIVED_DEPENDENCIES as qt, CoreSchemaWeaverConfig as r, InferFieldInput as rn, InferInputO as rt, getCacheType as s, MutationOptions as sn, capitalize as st, GraphQLSchemaLoom as t, GraphQLFieldOptions as tn, CallableInputParser as tt, WeaverConfig as u, QueryFactoryWithChain as un, ResolvingFields as ut, isSchemaVendorWeaver as v, SubscriptionFactoryWithChain as vn, notNullish as vt, DirectiveRecord as w, Mutation as wn, MiddlewareConfig as wt, ensureInputType as x, Field as xn, toObjMap as xt, ensureInterfaceType as y, SubscriptionOptions as yn, toArguments as yt, Executor as z, ResolvableSubscription as zn, markLocation as zt };
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_parse_resolving_fields = require('./parse-resolving-fields-k74tX3i9.cjs');
1
+ const require_parse_resolving_fields = require('./parse-resolving-fields-CJw_nGJ2.cjs');
2
2
  let graphql = require("graphql");
3
3
 
4
4
  //#region src/schema/weaver-context.ts
@@ -302,9 +302,14 @@ function getGraphQLType(silk$1) {
302
302
  if (require_parse_resolving_fields.GET_GRAPHQL_TYPE in silk$1 && silk$1[require_parse_resolving_fields.GET_GRAPHQL_TYPE] != null) return typeof silk$1[require_parse_resolving_fields.GET_GRAPHQL_TYPE] === "function" ? silk$1[require_parse_resolving_fields.GET_GRAPHQL_TYPE]() : silk$1[require_parse_resolving_fields.GET_GRAPHQL_TYPE];
303
303
  const vendorWeavers = weaverContext.vendorWeavers;
304
304
  if (vendorWeavers == null) throw new Error("Schema Weaver is not initialized");
305
- const weaver = vendorWeavers.get(silk$1["~standard"].vendor);
306
- if (weaver == null) throw new Error(`Schema Weaver for ${silk$1["~standard"].vendor} is not found`);
307
- return weaver.getGraphQLType(silk$1);
305
+ const vendor = silk$1["~standard"]?.vendor;
306
+ const weaver = vendor ? vendorWeavers.get(vendor) : void 0;
307
+ if (weaver != null) return weaver.getGraphQLType(silk$1);
308
+ if (silk$1["~standard"] && "jsonSchema" in silk$1["~standard"]) {
309
+ const jsonWeaver = vendorWeavers.get("json");
310
+ if (jsonWeaver != null) return jsonWeaver.getGraphQLType(silk$1);
311
+ }
312
+ throw new Error(`Schema Weaver for ${vendor} is not found`);
308
313
  }
309
314
  /**
310
315
  * Get GraphQL Argument Config from Silk.
@@ -315,10 +320,13 @@ function getGraphQLArgumentConfig(silk$1) {
315
320
  if (require_parse_resolving_fields.GET_GRAPHQL_ARGUMENT_CONFIG in silk$1 && silk$1[require_parse_resolving_fields.GET_GRAPHQL_ARGUMENT_CONFIG] != null) return typeof silk$1[require_parse_resolving_fields.GET_GRAPHQL_ARGUMENT_CONFIG] === "function" ? silk$1[require_parse_resolving_fields.GET_GRAPHQL_ARGUMENT_CONFIG]() : silk$1[require_parse_resolving_fields.GET_GRAPHQL_ARGUMENT_CONFIG];
316
321
  const vendorWeavers = weaverContext.vendorWeavers;
317
322
  if (vendorWeavers == null) return void 0;
318
- const weaver = vendorWeavers.get(silk$1["~standard"]?.vendor);
319
- if (weaver == null) return void 0;
320
- if (weaver.getGraphQLArgumentConfig == null) return void 0;
321
- return weaver.getGraphQLArgumentConfig(silk$1);
323
+ const vendor = silk$1["~standard"]?.vendor;
324
+ const weaver = vendor ? vendorWeavers.get(vendor) : void 0;
325
+ if (weaver?.getGraphQLArgumentConfig != null) return weaver.getGraphQLArgumentConfig(silk$1);
326
+ if (silk$1["~standard"] && "jsonSchema" in silk$1["~standard"]) {
327
+ const jsonWeaver = vendorWeavers.get("json");
328
+ if (jsonWeaver?.getGraphQLArgumentConfig != null) return jsonWeaver.getGraphQLArgumentConfig(silk$1);
329
+ }
322
330
  }
323
331
  /**
324
332
  * Validate and transform input to output
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as resolver, $t as FieldOptions, A as getGraphQLArgumentConfig, An as BaseChainFactory, At as MayGetter, B as ObjectChainResolver, Bn as SubscriptionChainFactory, Bt as tryIn, C as DirectiveItem, Cn as FieldOrOperation, Ct as Middleware, D as ListSilk, Dn as Resolver, Dt as applyMiddlewares, E as GQLoomExtensions, En as Query, Et as MiddlewareOptions, F as nullableSilk, Fn as MutationChainFactory, Ft as BatchLoadFn, G as createMutation, Gt as onlyMemoization, H as ResolverMeta, Hn as symbols_d_exports, Ht as assignContextMap, I as parseSilk, In as MutationFactoryWithResolve, It as EasyDataLoader, J as defaultSubscriptionResolve, Jt as getFieldOptions, K as createQuery, Kt as AUTO_ALIASING, L as silk, Ln as QueryChainFactory, Lt as LoomDataLoader, M as isSilk, Mn as FieldChainFactory, Mt as OmitInUnion, N as listSilk, Nn as FieldFactoryWithResolve, Nt as RequireKeys, O as NonNullSilk, On as Subscription, Ot as filterMiddlewares, P as nonNullSilk, Pn as IChainFactory, Pt as ValueOf, Q as query, Qt as FieldFactoryWithUtils, R as ChainResolver, Rn as QueryFactoryWithResolve, Rt as markErrorLocation, S as inputToArgs, Sn as FieldMeta, St as CallableMiddlewareOptions, T as GQLoomExtensionAttribute, Tn as Operation, Tt as MiddlewareOperation, U as ToExecutorProps, Un as StandardSchemaV1, Ut as getMemoizationMap, V as ResolverFactory, Vn as SubscriptionNeedResolve, Vt as OnlyMemoizationPayload, W as createField, Wt as isOnlyMemoryPayload, X as loom, Xt as getSubscriptionOptions, Y as field, Yt as getOperationOptions, Z as mutation, Zt as FieldFactory, _ as SchemaWeaver, _n as SubscriptionFactory, _t as meta, a as LoomObjectType, an as MutationFactory, at as getStandardValue, b as ensureInputObjectType, bn as BaseField, bt as toFieldMap, c as AliasList, cn as OperationType, ct as pascalCase, d as WeaverContext, dn as QueryOptions, dt as ResolvingFieldsOptions, en as FieldOrOperationType, et as subscription, f as collectName, fn as ResolverOptions, ft as getDeepResolvingFields, g as weaverContext, gn as ResolvingOptions, gt as mapValue, h as provideWeaverContext, hn as ResolverPayload, ht as deepMerge, i as CoreSchemaWeaverConfigOptions, in as InferFieldOutput, it as createInputParser, j as getGraphQLType, jn as ChainFactoryOptions, jt as MayPromise, k as NullableSilk, kn as types_loom_d_exports, kt as IsAny, l as GlobalWeaverContext, ln as QueryFactory, lt as screamingSnakeCase, m as initWeaverContext, mn as ResolverOptionsWithParent, mt as parseResolvingFields, n as weave, nn as GraphQLSilk, nt as InferInputI, o as OPERATION_OBJECT_NAMES, on as MutationFactoryWithChain, ot as parseInputValue, p as collectNames, pn as ResolverOptionsWithExtensions, pt as getResolvingFields, q as createSubscription, qt as DERIVED_DEPENDENCIES, r as CoreSchemaWeaverConfig, rn as InferFieldInput, rt as InferInputO, s as getCacheType, sn as MutationOptions, st as capitalize, t as GraphQLSchemaLoom, tn as GraphQLFieldOptions, tt as CallableInputParser, u as WeaverConfig, un as QueryFactoryWithChain, ut as ResolvingFields, v as isSchemaVendorWeaver, vn as SubscriptionFactoryWithChain, vt as notNullish, w as DirectiveRecord, wn as Mutation, wt as MiddlewareConfig, x as ensureInputType, xn as Field, xt as toObjMap, y as ensureInterfaceType, yn as SubscriptionOptions, yt as toArguments, z as Executor, zn as ResolvableSubscription, zt as markLocation } from "./index-BW7_Sr0t.cjs";
2
- export { AUTO_ALIASING, AliasList, BaseChainFactory, BaseField, BatchLoadFn, CallableInputParser, CallableMiddlewareOptions, ChainFactoryOptions, ChainResolver, CoreSchemaWeaverConfig, CoreSchemaWeaverConfigOptions, DERIVED_DEPENDENCIES, DirectiveItem, DirectiveRecord, EasyDataLoader, Executor, Field, FieldChainFactory, FieldFactory, FieldFactoryWithResolve, FieldFactoryWithUtils, FieldMeta, FieldOptions, FieldOrOperation, FieldOrOperationType, GQLoomExtensionAttribute, GQLoomExtensions, GlobalWeaverContext, GraphQLFieldOptions, GraphQLSchemaLoom, GraphQLSilk, IChainFactory, InferFieldInput, InferFieldOutput, InferInputI, InferInputO, IsAny, ListSilk, types_loom_d_exports as Loom, LoomDataLoader, LoomObjectType, MayGetter, MayPromise, Middleware, MiddlewareConfig, MiddlewareOperation, MiddlewareOptions, Mutation, MutationChainFactory, MutationFactory, MutationFactoryWithChain, MutationFactoryWithResolve, MutationOptions, NonNullSilk, NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, OmitInUnion, OnlyMemoizationPayload, Operation, OperationType, Query, QueryChainFactory, QueryFactory, QueryFactoryWithChain, QueryFactoryWithResolve, QueryOptions, RequireKeys, ResolvableSubscription, Resolver, ResolverFactory, ResolverMeta, ResolverOptions, ResolverOptionsWithExtensions, ResolverOptionsWithParent, ResolverPayload, ResolvingFields, ResolvingFieldsOptions, ResolvingOptions, symbols_d_exports as SYMBOLS, SchemaWeaver, StandardSchemaV1, Subscription, SubscriptionChainFactory, SubscriptionFactory, SubscriptionFactoryWithChain, SubscriptionNeedResolve, SubscriptionOptions, ToExecutorProps, ValueOf, WeaverConfig, WeaverContext, applyMiddlewares, assignContextMap, capitalize, collectName, collectNames, createField, createInputParser, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, filterMiddlewares, getCacheType, getDeepResolvingFields, getFieldOptions, getGraphQLArgumentConfig, getGraphQLType, getMemoizationMap, getOperationOptions, getResolvingFields, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseResolvingFields, parseSilk, pascalCase, provideWeaverContext, query, resolver, screamingSnakeCase, silk, subscription, toArguments, toFieldMap, toObjMap, tryIn, weave, weaverContext };
1
+ import { $ as resolver, $t as FieldOptions, A as getGraphQLArgumentConfig, An as BaseChainFactory, At as MayGetter, B as ObjectChainResolver, Bn as SubscriptionChainFactory, Bt as tryIn, C as DirectiveItem, Cn as FieldOrOperation, Ct as Middleware, D as ListSilk, Dn as Resolver, Dt as applyMiddlewares, E as GQLoomExtensions, En as Query, Et as MiddlewareOptions, F as nullableSilk, Fn as MutationChainFactory, Ft as BatchLoadFn, G as createMutation, Gn as StandardTypedV1, Gt as onlyMemoization, H as ResolverMeta, Hn as symbols_d_exports, Ht as assignContextMap, I as parseSilk, In as MutationFactoryWithResolve, It as EasyDataLoader, J as defaultSubscriptionResolve, Jt as getFieldOptions, K as createQuery, Kt as AUTO_ALIASING, L as silk, Ln as QueryChainFactory, Lt as LoomDataLoader, M as isSilk, Mn as FieldChainFactory, Mt as OmitInUnion, N as listSilk, Nn as FieldFactoryWithResolve, Nt as RequireKeys, O as NonNullSilk, On as Subscription, Ot as filterMiddlewares, P as nonNullSilk, Pn as IChainFactory, Pt as ValueOf, Q as query, Qt as FieldFactoryWithUtils, R as ChainResolver, Rn as QueryFactoryWithResolve, Rt as markErrorLocation, S as inputToArgs, Sn as FieldMeta, St as CallableMiddlewareOptions, T as GQLoomExtensionAttribute, Tn as Operation, Tt as MiddlewareOperation, U as ToExecutorProps, Un as StandardJSONSchemaV1, Ut as getMemoizationMap, V as ResolverFactory, Vn as SubscriptionNeedResolve, Vt as OnlyMemoizationPayload, W as createField, Wn as StandardSchemaV1, Wt as isOnlyMemoryPayload, X as loom, Xt as getSubscriptionOptions, Y as field, Yt as getOperationOptions, Z as mutation, Zt as FieldFactory, _ as SchemaWeaver, _n as SubscriptionFactory, _t as meta, a as LoomObjectType, an as MutationFactory, at as getStandardValue, b as ensureInputObjectType, bn as BaseField, bt as toFieldMap, c as AliasList, cn as OperationType, ct as pascalCase, d as WeaverContext, dn as QueryOptions, dt as ResolvingFieldsOptions, en as FieldOrOperationType, et as subscription, f as collectName, fn as ResolverOptions, ft as getDeepResolvingFields, g as weaverContext, gn as ResolvingOptions, gt as mapValue, h as provideWeaverContext, hn as ResolverPayload, ht as deepMerge, i as CoreSchemaWeaverConfigOptions, in as InferFieldOutput, it as createInputParser, j as getGraphQLType, jn as ChainFactoryOptions, jt as MayPromise, k as NullableSilk, kn as types_loom_d_exports, kt as IsAny, l as GlobalWeaverContext, ln as QueryFactory, lt as screamingSnakeCase, m as initWeaverContext, mn as ResolverOptionsWithParent, mt as parseResolvingFields, n as weave, nn as GraphQLSilk, nt as InferInputI, o as OPERATION_OBJECT_NAMES, on as MutationFactoryWithChain, ot as parseInputValue, p as collectNames, pn as ResolverOptionsWithExtensions, pt as getResolvingFields, q as createSubscription, qt as DERIVED_DEPENDENCIES, r as CoreSchemaWeaverConfig, rn as InferFieldInput, rt as InferInputO, s as getCacheType, sn as MutationOptions, st as capitalize, t as GraphQLSchemaLoom, tn as GraphQLFieldOptions, tt as CallableInputParser, u as WeaverConfig, un as QueryFactoryWithChain, ut as ResolvingFields, v as isSchemaVendorWeaver, vn as SubscriptionFactoryWithChain, vt as notNullish, w as DirectiveRecord, wn as Mutation, wt as MiddlewareConfig, x as ensureInputType, xn as Field, xt as toObjMap, y as ensureInterfaceType, yn as SubscriptionOptions, yt as toArguments, z as Executor, zn as ResolvableSubscription, zt as markLocation } from "./index-BstkglTj.cjs";
2
+ export { AUTO_ALIASING, AliasList, BaseChainFactory, BaseField, BatchLoadFn, CallableInputParser, CallableMiddlewareOptions, ChainFactoryOptions, ChainResolver, CoreSchemaWeaverConfig, CoreSchemaWeaverConfigOptions, DERIVED_DEPENDENCIES, DirectiveItem, DirectiveRecord, EasyDataLoader, Executor, Field, FieldChainFactory, FieldFactory, FieldFactoryWithResolve, FieldFactoryWithUtils, FieldMeta, FieldOptions, FieldOrOperation, FieldOrOperationType, GQLoomExtensionAttribute, GQLoomExtensions, GlobalWeaverContext, GraphQLFieldOptions, GraphQLSchemaLoom, GraphQLSilk, IChainFactory, InferFieldInput, InferFieldOutput, InferInputI, InferInputO, IsAny, ListSilk, types_loom_d_exports as Loom, LoomDataLoader, LoomObjectType, MayGetter, MayPromise, Middleware, MiddlewareConfig, MiddlewareOperation, MiddlewareOptions, Mutation, MutationChainFactory, MutationFactory, MutationFactoryWithChain, MutationFactoryWithResolve, MutationOptions, NonNullSilk, NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, OmitInUnion, OnlyMemoizationPayload, Operation, OperationType, Query, QueryChainFactory, QueryFactory, QueryFactoryWithChain, QueryFactoryWithResolve, QueryOptions, RequireKeys, ResolvableSubscription, Resolver, ResolverFactory, ResolverMeta, ResolverOptions, ResolverOptionsWithExtensions, ResolverOptionsWithParent, ResolverPayload, ResolvingFields, ResolvingFieldsOptions, ResolvingOptions, symbols_d_exports as SYMBOLS, SchemaWeaver, StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1, Subscription, SubscriptionChainFactory, SubscriptionFactory, SubscriptionFactoryWithChain, SubscriptionNeedResolve, SubscriptionOptions, ToExecutorProps, ValueOf, WeaverConfig, WeaverContext, applyMiddlewares, assignContextMap, capitalize, collectName, collectNames, createField, createInputParser, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, filterMiddlewares, getCacheType, getDeepResolvingFields, getFieldOptions, getGraphQLArgumentConfig, getGraphQLType, getMemoizationMap, getOperationOptions, getResolvingFields, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseResolvingFields, parseSilk, pascalCase, provideWeaverContext, query, resolver, screamingSnakeCase, silk, subscription, toArguments, toFieldMap, toObjMap, tryIn, weave, weaverContext };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as resolver, $t as FieldOptions, A as getGraphQLArgumentConfig, An as BaseChainFactory, At as MayGetter, B as ObjectChainResolver, Bn as SubscriptionChainFactory, Bt as tryIn, C as DirectiveItem, Cn as FieldOrOperation, Ct as Middleware, D as ListSilk, Dn as Resolver, Dt as applyMiddlewares, E as GQLoomExtensions, En as Query, Et as MiddlewareOptions, F as nullableSilk, Fn as MutationChainFactory, Ft as BatchLoadFn, G as createMutation, Gt as onlyMemoization, H as ResolverMeta, Hn as symbols_d_exports, Ht as assignContextMap, I as parseSilk, In as MutationFactoryWithResolve, It as EasyDataLoader, J as defaultSubscriptionResolve, Jt as getFieldOptions, K as createQuery, Kt as AUTO_ALIASING, L as silk, Ln as QueryChainFactory, Lt as LoomDataLoader, M as isSilk, Mn as FieldChainFactory, Mt as OmitInUnion, N as listSilk, Nn as FieldFactoryWithResolve, Nt as RequireKeys, O as NonNullSilk, On as Subscription, Ot as filterMiddlewares, P as nonNullSilk, Pn as IChainFactory, Pt as ValueOf, Q as query, Qt as FieldFactoryWithUtils, R as ChainResolver, Rn as QueryFactoryWithResolve, Rt as markErrorLocation, S as inputToArgs, Sn as FieldMeta, St as CallableMiddlewareOptions, T as GQLoomExtensionAttribute, Tn as Operation, Tt as MiddlewareOperation, U as ToExecutorProps, Un as StandardSchemaV1, Ut as getMemoizationMap, V as ResolverFactory, Vn as SubscriptionNeedResolve, Vt as OnlyMemoizationPayload, W as createField, Wt as isOnlyMemoryPayload, X as loom, Xt as getSubscriptionOptions, Y as field, Yt as getOperationOptions, Z as mutation, Zt as FieldFactory, _ as SchemaWeaver, _n as SubscriptionFactory, _t as meta, a as LoomObjectType, an as MutationFactory, at as getStandardValue, b as ensureInputObjectType, bn as BaseField, bt as toFieldMap, c as AliasList, cn as OperationType, ct as pascalCase, d as WeaverContext, dn as QueryOptions, dt as ResolvingFieldsOptions, en as FieldOrOperationType, et as subscription, f as collectName, fn as ResolverOptions, ft as getDeepResolvingFields, g as weaverContext, gn as ResolvingOptions, gt as mapValue, h as provideWeaverContext, hn as ResolverPayload, ht as deepMerge, i as CoreSchemaWeaverConfigOptions, in as InferFieldOutput, it as createInputParser, j as getGraphQLType, jn as ChainFactoryOptions, jt as MayPromise, k as NullableSilk, kn as types_loom_d_exports, kt as IsAny, l as GlobalWeaverContext, ln as QueryFactory, lt as screamingSnakeCase, m as initWeaverContext, mn as ResolverOptionsWithParent, mt as parseResolvingFields, n as weave, nn as GraphQLSilk, nt as InferInputI, o as OPERATION_OBJECT_NAMES, on as MutationFactoryWithChain, ot as parseInputValue, p as collectNames, pn as ResolverOptionsWithExtensions, pt as getResolvingFields, q as createSubscription, qt as DERIVED_DEPENDENCIES, r as CoreSchemaWeaverConfig, rn as InferFieldInput, rt as InferInputO, s as getCacheType, sn as MutationOptions, st as capitalize, t as GraphQLSchemaLoom, tn as GraphQLFieldOptions, tt as CallableInputParser, u as WeaverConfig, un as QueryFactoryWithChain, ut as ResolvingFields, v as isSchemaVendorWeaver, vn as SubscriptionFactoryWithChain, vt as notNullish, w as DirectiveRecord, wn as Mutation, wt as MiddlewareConfig, x as ensureInputType, xn as Field, xt as toObjMap, y as ensureInterfaceType, yn as SubscriptionOptions, yt as toArguments, z as Executor, zn as ResolvableSubscription, zt as markLocation } from "./index-CFo2-jU-.js";
2
- export { AUTO_ALIASING, AliasList, BaseChainFactory, BaseField, BatchLoadFn, CallableInputParser, CallableMiddlewareOptions, ChainFactoryOptions, ChainResolver, CoreSchemaWeaverConfig, CoreSchemaWeaverConfigOptions, DERIVED_DEPENDENCIES, DirectiveItem, DirectiveRecord, EasyDataLoader, Executor, Field, FieldChainFactory, FieldFactory, FieldFactoryWithResolve, FieldFactoryWithUtils, FieldMeta, FieldOptions, FieldOrOperation, FieldOrOperationType, GQLoomExtensionAttribute, GQLoomExtensions, GlobalWeaverContext, GraphQLFieldOptions, GraphQLSchemaLoom, GraphQLSilk, IChainFactory, InferFieldInput, InferFieldOutput, InferInputI, InferInputO, IsAny, ListSilk, types_loom_d_exports as Loom, LoomDataLoader, LoomObjectType, MayGetter, MayPromise, Middleware, MiddlewareConfig, MiddlewareOperation, MiddlewareOptions, Mutation, MutationChainFactory, MutationFactory, MutationFactoryWithChain, MutationFactoryWithResolve, MutationOptions, NonNullSilk, NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, OmitInUnion, OnlyMemoizationPayload, Operation, OperationType, Query, QueryChainFactory, QueryFactory, QueryFactoryWithChain, QueryFactoryWithResolve, QueryOptions, RequireKeys, ResolvableSubscription, Resolver, ResolverFactory, ResolverMeta, ResolverOptions, ResolverOptionsWithExtensions, ResolverOptionsWithParent, ResolverPayload, ResolvingFields, ResolvingFieldsOptions, ResolvingOptions, symbols_d_exports as SYMBOLS, SchemaWeaver, StandardSchemaV1, Subscription, SubscriptionChainFactory, SubscriptionFactory, SubscriptionFactoryWithChain, SubscriptionNeedResolve, SubscriptionOptions, ToExecutorProps, ValueOf, WeaverConfig, WeaverContext, applyMiddlewares, assignContextMap, capitalize, collectName, collectNames, createField, createInputParser, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, filterMiddlewares, getCacheType, getDeepResolvingFields, getFieldOptions, getGraphQLArgumentConfig, getGraphQLType, getMemoizationMap, getOperationOptions, getResolvingFields, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseResolvingFields, parseSilk, pascalCase, provideWeaverContext, query, resolver, screamingSnakeCase, silk, subscription, toArguments, toFieldMap, toObjMap, tryIn, weave, weaverContext };
1
+ import { $ as resolver, $t as FieldOptions, A as getGraphQLArgumentConfig, An as BaseChainFactory, At as MayGetter, B as ObjectChainResolver, Bn as SubscriptionChainFactory, Bt as tryIn, C as DirectiveItem, Cn as FieldOrOperation, Ct as Middleware, D as ListSilk, Dn as Resolver, Dt as applyMiddlewares, E as GQLoomExtensions, En as Query, Et as MiddlewareOptions, F as nullableSilk, Fn as MutationChainFactory, Ft as BatchLoadFn, G as createMutation, Gn as StandardTypedV1, Gt as onlyMemoization, H as ResolverMeta, Hn as symbols_d_exports, Ht as assignContextMap, I as parseSilk, In as MutationFactoryWithResolve, It as EasyDataLoader, J as defaultSubscriptionResolve, Jt as getFieldOptions, K as createQuery, Kt as AUTO_ALIASING, L as silk, Ln as QueryChainFactory, Lt as LoomDataLoader, M as isSilk, Mn as FieldChainFactory, Mt as OmitInUnion, N as listSilk, Nn as FieldFactoryWithResolve, Nt as RequireKeys, O as NonNullSilk, On as Subscription, Ot as filterMiddlewares, P as nonNullSilk, Pn as IChainFactory, Pt as ValueOf, Q as query, Qt as FieldFactoryWithUtils, R as ChainResolver, Rn as QueryFactoryWithResolve, Rt as markErrorLocation, S as inputToArgs, Sn as FieldMeta, St as CallableMiddlewareOptions, T as GQLoomExtensionAttribute, Tn as Operation, Tt as MiddlewareOperation, U as ToExecutorProps, Un as StandardJSONSchemaV1, Ut as getMemoizationMap, V as ResolverFactory, Vn as SubscriptionNeedResolve, Vt as OnlyMemoizationPayload, W as createField, Wn as StandardSchemaV1, Wt as isOnlyMemoryPayload, X as loom, Xt as getSubscriptionOptions, Y as field, Yt as getOperationOptions, Z as mutation, Zt as FieldFactory, _ as SchemaWeaver, _n as SubscriptionFactory, _t as meta, a as LoomObjectType, an as MutationFactory, at as getStandardValue, b as ensureInputObjectType, bn as BaseField, bt as toFieldMap, c as AliasList, cn as OperationType, ct as pascalCase, d as WeaverContext, dn as QueryOptions, dt as ResolvingFieldsOptions, en as FieldOrOperationType, et as subscription, f as collectName, fn as ResolverOptions, ft as getDeepResolvingFields, g as weaverContext, gn as ResolvingOptions, gt as mapValue, h as provideWeaverContext, hn as ResolverPayload, ht as deepMerge, i as CoreSchemaWeaverConfigOptions, in as InferFieldOutput, it as createInputParser, j as getGraphQLType, jn as ChainFactoryOptions, jt as MayPromise, k as NullableSilk, kn as types_loom_d_exports, kt as IsAny, l as GlobalWeaverContext, ln as QueryFactory, lt as screamingSnakeCase, m as initWeaverContext, mn as ResolverOptionsWithParent, mt as parseResolvingFields, n as weave, nn as GraphQLSilk, nt as InferInputI, o as OPERATION_OBJECT_NAMES, on as MutationFactoryWithChain, ot as parseInputValue, p as collectNames, pn as ResolverOptionsWithExtensions, pt as getResolvingFields, q as createSubscription, qt as DERIVED_DEPENDENCIES, r as CoreSchemaWeaverConfig, rn as InferFieldInput, rt as InferInputO, s as getCacheType, sn as MutationOptions, st as capitalize, t as GraphQLSchemaLoom, tn as GraphQLFieldOptions, tt as CallableInputParser, u as WeaverConfig, un as QueryFactoryWithChain, ut as ResolvingFields, v as isSchemaVendorWeaver, vn as SubscriptionFactoryWithChain, vt as notNullish, w as DirectiveRecord, wn as Mutation, wt as MiddlewareConfig, x as ensureInputType, xn as Field, xt as toObjMap, y as ensureInterfaceType, yn as SubscriptionOptions, yt as toArguments, z as Executor, zn as ResolvableSubscription, zt as markLocation } from "./index-CrKRwsqN.js";
2
+ export { AUTO_ALIASING, AliasList, BaseChainFactory, BaseField, BatchLoadFn, CallableInputParser, CallableMiddlewareOptions, ChainFactoryOptions, ChainResolver, CoreSchemaWeaverConfig, CoreSchemaWeaverConfigOptions, DERIVED_DEPENDENCIES, DirectiveItem, DirectiveRecord, EasyDataLoader, Executor, Field, FieldChainFactory, FieldFactory, FieldFactoryWithResolve, FieldFactoryWithUtils, FieldMeta, FieldOptions, FieldOrOperation, FieldOrOperationType, GQLoomExtensionAttribute, GQLoomExtensions, GlobalWeaverContext, GraphQLFieldOptions, GraphQLSchemaLoom, GraphQLSilk, IChainFactory, InferFieldInput, InferFieldOutput, InferInputI, InferInputO, IsAny, ListSilk, types_loom_d_exports as Loom, LoomDataLoader, LoomObjectType, MayGetter, MayPromise, Middleware, MiddlewareConfig, MiddlewareOperation, MiddlewareOptions, Mutation, MutationChainFactory, MutationFactory, MutationFactoryWithChain, MutationFactoryWithResolve, MutationOptions, NonNullSilk, NullableSilk, OPERATION_OBJECT_NAMES, ObjectChainResolver, OmitInUnion, OnlyMemoizationPayload, Operation, OperationType, Query, QueryChainFactory, QueryFactory, QueryFactoryWithChain, QueryFactoryWithResolve, QueryOptions, RequireKeys, ResolvableSubscription, Resolver, ResolverFactory, ResolverMeta, ResolverOptions, ResolverOptionsWithExtensions, ResolverOptionsWithParent, ResolverPayload, ResolvingFields, ResolvingFieldsOptions, ResolvingOptions, symbols_d_exports as SYMBOLS, SchemaWeaver, StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1, Subscription, SubscriptionChainFactory, SubscriptionFactory, SubscriptionFactoryWithChain, SubscriptionNeedResolve, SubscriptionOptions, ToExecutorProps, ValueOf, WeaverConfig, WeaverContext, applyMiddlewares, assignContextMap, capitalize, collectName, collectNames, createField, createInputParser, createMutation, createQuery, createSubscription, deepMerge, defaultSubscriptionResolve, ensureInputObjectType, ensureInputType, ensureInterfaceType, field, filterMiddlewares, getCacheType, getDeepResolvingFields, getFieldOptions, getGraphQLArgumentConfig, getGraphQLType, getMemoizationMap, getOperationOptions, getResolvingFields, getStandardValue, getSubscriptionOptions, initWeaverContext, inputToArgs, isOnlyMemoryPayload, isSchemaVendorWeaver, isSilk, listSilk, loom, mapValue, markErrorLocation, markLocation, meta, mutation, nonNullSilk, notNullish, nullableSilk, onlyMemoization, parseInputValue, parseResolvingFields, parseSilk, pascalCase, provideWeaverContext, query, resolver, screamingSnakeCase, silk, subscription, toArguments, toFieldMap, toObjMap, tryIn, weave, weaverContext };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as getMemoizationMap, c as FIELD_HIDDEN, d as IS_RESOLVER, f as WEAVER_CONFIG, h as DERIVED_DEPENDENCIES, i as assignContextMap, l as GET_GRAPHQL_ARGUMENT_CONFIG, m as AUTO_ALIASING, n as getResolvingFields, o as isOnlyMemoryPayload, p as symbols_exports, r as parseResolvingFields, s as onlyMemoization, t as getDeepResolvingFields, u as GET_GRAPHQL_TYPE } from "./parse-resolving-fields-GAEhHjUw.js";
1
+ import { a as getMemoizationMap, c as FIELD_HIDDEN, d as IS_RESOLVER, f as WEAVER_CONFIG, h as DERIVED_DEPENDENCIES, i as assignContextMap, l as GET_GRAPHQL_ARGUMENT_CONFIG, m as AUTO_ALIASING, n as getResolvingFields, o as isOnlyMemoryPayload, p as symbols_exports, r as parseResolvingFields, s as onlyMemoization, t as getDeepResolvingFields, u as GET_GRAPHQL_TYPE } from "./parse-resolving-fields-B9xSmxNH.js";
2
2
  import { GraphQLError, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLSchema, GraphQLUnionType, isEnumType, isInputObjectType, isInterfaceType, isListType, isNonNullType, isObjectType, isScalarType, isUnionType } from "graphql";
3
3
 
4
4
  //#region src/schema/weaver-context.ts
@@ -302,9 +302,14 @@ function getGraphQLType(silk$1) {
302
302
  if (GET_GRAPHQL_TYPE in silk$1 && silk$1[GET_GRAPHQL_TYPE] != null) return typeof silk$1[GET_GRAPHQL_TYPE] === "function" ? silk$1[GET_GRAPHQL_TYPE]() : silk$1[GET_GRAPHQL_TYPE];
303
303
  const vendorWeavers = weaverContext.vendorWeavers;
304
304
  if (vendorWeavers == null) throw new Error("Schema Weaver is not initialized");
305
- const weaver = vendorWeavers.get(silk$1["~standard"].vendor);
306
- if (weaver == null) throw new Error(`Schema Weaver for ${silk$1["~standard"].vendor} is not found`);
307
- return weaver.getGraphQLType(silk$1);
305
+ const vendor = silk$1["~standard"]?.vendor;
306
+ const weaver = vendor ? vendorWeavers.get(vendor) : void 0;
307
+ if (weaver != null) return weaver.getGraphQLType(silk$1);
308
+ if (silk$1["~standard"] && "jsonSchema" in silk$1["~standard"]) {
309
+ const jsonWeaver = vendorWeavers.get("json");
310
+ if (jsonWeaver != null) return jsonWeaver.getGraphQLType(silk$1);
311
+ }
312
+ throw new Error(`Schema Weaver for ${vendor} is not found`);
308
313
  }
309
314
  /**
310
315
  * Get GraphQL Argument Config from Silk.
@@ -315,10 +320,13 @@ function getGraphQLArgumentConfig(silk$1) {
315
320
  if (GET_GRAPHQL_ARGUMENT_CONFIG in silk$1 && silk$1[GET_GRAPHQL_ARGUMENT_CONFIG] != null) return typeof silk$1[GET_GRAPHQL_ARGUMENT_CONFIG] === "function" ? silk$1[GET_GRAPHQL_ARGUMENT_CONFIG]() : silk$1[GET_GRAPHQL_ARGUMENT_CONFIG];
316
321
  const vendorWeavers = weaverContext.vendorWeavers;
317
322
  if (vendorWeavers == null) return void 0;
318
- const weaver = vendorWeavers.get(silk$1["~standard"]?.vendor);
319
- if (weaver == null) return void 0;
320
- if (weaver.getGraphQLArgumentConfig == null) return void 0;
321
- return weaver.getGraphQLArgumentConfig(silk$1);
323
+ const vendor = silk$1["~standard"]?.vendor;
324
+ const weaver = vendor ? vendorWeavers.get(vendor) : void 0;
325
+ if (weaver?.getGraphQLArgumentConfig != null) return weaver.getGraphQLArgumentConfig(silk$1);
326
+ if (silk$1["~standard"] && "jsonSchema" in silk$1["~standard"]) {
327
+ const jsonWeaver = vendorWeavers.get("json");
328
+ if (jsonWeaver?.getGraphQLArgumentConfig != null) return jsonWeaver.getGraphQLArgumentConfig(silk$1);
329
+ }
322
330
  }
323
331
  /**
324
332
  * Validate and transform input to output
@@ -1,4 +1,4 @@
1
- import { t as __export } from "./chunk-BL09k0x-.js";
1
+ import { t as __exportAll } from "./chunk-CXurZ27M.js";
2
2
  import { Kind, isInterfaceType, isListType, isNonNullType, isObjectType } from "graphql";
3
3
 
4
4
  //#region src/utils/constants.ts
@@ -7,7 +7,7 @@ const AUTO_ALIASING = "__gqloom_auto_aliasing";
7
7
 
8
8
  //#endregion
9
9
  //#region src/utils/symbols.ts
10
- var symbols_exports = /* @__PURE__ */ __export({
10
+ var symbols_exports = /* @__PURE__ */ __exportAll({
11
11
  CONTEXT_MAP_KEY: () => CONTEXT_MAP_KEY,
12
12
  FIELD_HIDDEN: () => FIELD_HIDDEN,
13
13
  GET_GRAPHQL_ARGUMENT_CONFIG: () => GET_GRAPHQL_ARGUMENT_CONFIG,
@@ -1,6 +1,6 @@
1
1
  //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (all, symbols) => {
3
+ var __exportAll = (all, symbols) => {
4
4
  let target = {};
5
5
  for (var name in all) {
6
6
  __defProp(target, name, {
@@ -23,7 +23,7 @@ const AUTO_ALIASING = "__gqloom_auto_aliasing";
23
23
 
24
24
  //#endregion
25
25
  //#region src/utils/symbols.ts
26
- var symbols_exports = /* @__PURE__ */ __export({
26
+ var symbols_exports = /* @__PURE__ */ __exportAll({
27
27
  CONTEXT_MAP_KEY: () => CONTEXT_MAP_KEY,
28
28
  FIELD_HIDDEN: () => FIELD_HIDDEN,
29
29
  GET_GRAPHQL_ARGUMENT_CONFIG: () => GET_GRAPHQL_ARGUMENT_CONFIG,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gqloom/core",
3
- "version": "0.14.4",
3
+ "version": "0.15.0",
4
4
  "description": "Create GraphQL schema and resolvers with TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -62,7 +62,7 @@
62
62
  "access": "public"
63
63
  },
64
64
  "devDependencies": {
65
- "@standard-schema/spec": "1.0.0"
65
+ "@standard-schema/spec": "1.1.0"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsdown",