@gqloom/core 0.9.3 → 0.9.5
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/{chunk-BQAPYNA7.js → chunk-JWAIAFGL.js} +1 -1
- package/dist/{context-BbSIyDtg.d.cts → context-DpbzXubn.d.cts} +10 -2
- package/dist/{context-BbSIyDtg.d.ts → context-DpbzXubn.d.ts} +10 -2
- package/dist/context.cjs +0 -1
- package/dist/context.d.cts +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/context.js +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -1
- package/package.json +1 -1
|
@@ -183,7 +183,7 @@ var WEAVER_CONFIG = Symbol.for("gqloom.weaver_config");
|
|
|
183
183
|
var RESOLVER_OPTIONS_KEY = Symbol.for("gqloom.resolver-options");
|
|
184
184
|
var IS_RESOLVER = Symbol.for("gqloom.is-resolver");
|
|
185
185
|
var CONTEXT_MAP_KEY = Symbol.for("gqloom.context-map");
|
|
186
|
-
var FIELD_HIDDEN =
|
|
186
|
+
var FIELD_HIDDEN = false;
|
|
187
187
|
|
|
188
188
|
// src/utils/context.ts
|
|
189
189
|
function onlyMemoization() {
|
|
@@ -88,9 +88,9 @@ declare const IS_RESOLVER: unique symbol;
|
|
|
88
88
|
*/
|
|
89
89
|
declare const CONTEXT_MAP_KEY: unique symbol;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Set fields to be hidden
|
|
92
92
|
*/
|
|
93
|
-
declare const FIELD_HIDDEN
|
|
93
|
+
declare const FIELD_HIDDEN = false;
|
|
94
94
|
|
|
95
95
|
declare const symbols_CONTEXT_MAP_KEY: typeof CONTEXT_MAP_KEY;
|
|
96
96
|
declare const symbols_FIELD_HIDDEN: typeof FIELD_HIDDEN;
|
|
@@ -129,6 +129,14 @@ interface CallableInputParser<TSchema extends GraphQLSilk | Record<string, Graph
|
|
|
129
129
|
* Parse the input and return the result
|
|
130
130
|
*/
|
|
131
131
|
getResult(): Promise<InferInputO<TSchema>>;
|
|
132
|
+
/**
|
|
133
|
+
* Set the result's value of parsing
|
|
134
|
+
*/
|
|
135
|
+
setResult(value: InferInputO<TSchema>): void;
|
|
136
|
+
/**
|
|
137
|
+
* Clear the result of parsing, the parser will run again to get the result.
|
|
138
|
+
*/
|
|
139
|
+
clearResult(): void;
|
|
132
140
|
}
|
|
133
141
|
declare function createInputParser<TSchema extends GraphQLSilk | Record<string, GraphQLSilk> | void>(schema: TSchema, value: InferInputI<TSchema>): CallableInputParser<TSchema>;
|
|
134
142
|
declare function parseInputValue<TSchema extends GraphQLSilk | Record<string, GraphQLSilk> | void>(inputSchema: TSchema, input: any): MayPromise<StandardSchemaV1.Result<InferInputO<TSchema>>>;
|
|
@@ -88,9 +88,9 @@ declare const IS_RESOLVER: unique symbol;
|
|
|
88
88
|
*/
|
|
89
89
|
declare const CONTEXT_MAP_KEY: unique symbol;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Set fields to be hidden
|
|
92
92
|
*/
|
|
93
|
-
declare const FIELD_HIDDEN
|
|
93
|
+
declare const FIELD_HIDDEN = false;
|
|
94
94
|
|
|
95
95
|
declare const symbols_CONTEXT_MAP_KEY: typeof CONTEXT_MAP_KEY;
|
|
96
96
|
declare const symbols_FIELD_HIDDEN: typeof FIELD_HIDDEN;
|
|
@@ -129,6 +129,14 @@ interface CallableInputParser<TSchema extends GraphQLSilk | Record<string, Graph
|
|
|
129
129
|
* Parse the input and return the result
|
|
130
130
|
*/
|
|
131
131
|
getResult(): Promise<InferInputO<TSchema>>;
|
|
132
|
+
/**
|
|
133
|
+
* Set the result's value of parsing
|
|
134
|
+
*/
|
|
135
|
+
setResult(value: InferInputO<TSchema>): void;
|
|
136
|
+
/**
|
|
137
|
+
* Clear the result of parsing, the parser will run again to get the result.
|
|
138
|
+
*/
|
|
139
|
+
clearResult(): void;
|
|
132
140
|
}
|
|
133
141
|
declare function createInputParser<TSchema extends GraphQLSilk | Record<string, GraphQLSilk> | void>(schema: TSchema, value: InferInputI<TSchema>): CallableInputParser<TSchema>;
|
|
134
142
|
declare function parseInputValue<TSchema extends GraphQLSilk | Record<string, GraphQLSilk> | void>(inputSchema: TSchema, input: any): MayPromise<StandardSchemaV1.Result<InferInputO<TSchema>>>;
|
package/dist/context.cjs
CHANGED
|
@@ -205,7 +205,6 @@ var WEAVER_CONFIG = Symbol.for("gqloom.weaver_config");
|
|
|
205
205
|
var RESOLVER_OPTIONS_KEY = Symbol.for("gqloom.resolver-options");
|
|
206
206
|
var IS_RESOLVER = Symbol.for("gqloom.is-resolver");
|
|
207
207
|
var CONTEXT_MAP_KEY = Symbol.for("gqloom.context-map");
|
|
208
|
-
var FIELD_HIDDEN = Symbol.for("gqloom.field-hidden");
|
|
209
208
|
|
|
210
209
|
// src/utils/context.ts
|
|
211
210
|
function onlyMemoization() {
|
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-DpbzXubn.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-DpbzXubn.js';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
3
|
import 'graphql';
|
|
4
4
|
|
package/dist/context.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -490,7 +490,7 @@ var WEAVER_CONFIG = Symbol.for("gqloom.weaver_config");
|
|
|
490
490
|
var RESOLVER_OPTIONS_KEY = Symbol.for("gqloom.resolver-options");
|
|
491
491
|
var IS_RESOLVER = Symbol.for("gqloom.is-resolver");
|
|
492
492
|
var CONTEXT_MAP_KEY = Symbol.for("gqloom.context-map");
|
|
493
|
-
var FIELD_HIDDEN =
|
|
493
|
+
var FIELD_HIDDEN = false;
|
|
494
494
|
|
|
495
495
|
// src/utils/context.ts
|
|
496
496
|
function onlyMemoization() {
|
|
@@ -736,6 +736,12 @@ function createInputParser(schema, value) {
|
|
|
736
736
|
Object.defineProperty(parse, "getResult", {
|
|
737
737
|
value: async () => getStandardValue(await parse())
|
|
738
738
|
});
|
|
739
|
+
Object.defineProperty(parse, "setResult", {
|
|
740
|
+
value: (value2) => result = { value: value2 }
|
|
741
|
+
});
|
|
742
|
+
Object.defineProperty(parse, "clearResult", {
|
|
743
|
+
value: () => result = void 0
|
|
744
|
+
});
|
|
739
745
|
return parse;
|
|
740
746
|
}
|
|
741
747
|
function parseInputValue(inputSchema, input) {
|
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-DpbzXubn.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-DpbzXubn.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-DpbzXubn.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-DpbzXubn.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
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
onlyMemoization,
|
|
12
12
|
parseResolvingFields,
|
|
13
13
|
symbols_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JWAIAFGL.js";
|
|
15
15
|
|
|
16
16
|
// src/utils/args.ts
|
|
17
17
|
function getOperationOptions(resolveOrOptions) {
|
|
@@ -467,6 +467,12 @@ function createInputParser(schema, value) {
|
|
|
467
467
|
Object.defineProperty(parse, "getResult", {
|
|
468
468
|
value: async () => getStandardValue(await parse())
|
|
469
469
|
});
|
|
470
|
+
Object.defineProperty(parse, "setResult", {
|
|
471
|
+
value: (value2) => result = { value: value2 }
|
|
472
|
+
});
|
|
473
|
+
Object.defineProperty(parse, "clearResult", {
|
|
474
|
+
value: () => result = void 0
|
|
475
|
+
});
|
|
470
476
|
return parse;
|
|
471
477
|
}
|
|
472
478
|
function parseInputValue(inputSchema, input) {
|