@gqloom/core 0.2.0 → 0.2.1
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/README.md +1 -2
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,8 +17,7 @@ GQLoom is inspired by [tRPC](https://trpc.io/), [TypeGraphQL](https://typegraphq
|
|
|
17
17
|
## Hello, World!
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
import { weave } from "@gqloom/
|
|
21
|
-
import { resolver, query } from "@gqloom/valibot"
|
|
20
|
+
import { resolver, query, weave } from "@gqloom/valibot"
|
|
22
21
|
import * as v from "valibot"
|
|
23
22
|
|
|
24
23
|
const HelloResolver = resolver({
|
package/dist/index.d.cts
CHANGED
|
@@ -205,9 +205,13 @@ declare function getSubscriptionOptions(subscribeOrOptions: (() => any) | Subscr
|
|
|
205
205
|
declare function getFieldOptions({ description, deprecationReason, extensions, }: GraphQLFieldOptions): GraphQLFieldOptions;
|
|
206
206
|
|
|
207
207
|
interface MiddlewarePayload<TField extends GenericFieldOrOperation = FieldOrOperation<any, any, any, any>> {
|
|
208
|
+
/** The Output Silk of the field */
|
|
208
209
|
outputSilk: InferSilkO<InferFieldOutput<TField>>;
|
|
210
|
+
/** The previous object, which for a field on the root Query type is often not used. */
|
|
209
211
|
parent: TField extends FieldOrOperation<infer TParent, any, any, any> ? TParent extends undefined ? undefined : InferSilkO<NonNullable<TParent>> : never;
|
|
212
|
+
/** A function to parse the input of the field */
|
|
210
213
|
parseInput: TField extends FieldOrOperation<any, any, infer TInput, any> ? CallableInputParser<TInput> : undefined;
|
|
214
|
+
/** The type of the field: `query`, `mutation`, `subscription` or `field` */
|
|
211
215
|
type: FieldOrOperationType;
|
|
212
216
|
}
|
|
213
217
|
type Middleware<TField extends GenericFieldOrOperation = FieldOrOperation<any, any, any, any>> = (next: () => MayPromise<InferSilkO<InferFieldOutput<TField>>>, payload: MiddlewarePayload<TField>) => MayPromise<InferSilkO<InferFieldOutput<TField>>>;
|
|
@@ -223,7 +227,7 @@ interface ResolverPayload<TContext extends object = object, TField extends Field
|
|
|
223
227
|
*/
|
|
224
228
|
readonly root: any;
|
|
225
229
|
/**
|
|
226
|
-
* The
|
|
230
|
+
* The arguments provided to the field in the GraphQL query.
|
|
227
231
|
*/
|
|
228
232
|
readonly args: Record<string, any>;
|
|
229
233
|
/**
|
|
@@ -231,7 +235,7 @@ interface ResolverPayload<TContext extends object = object, TField extends Field
|
|
|
231
235
|
*/
|
|
232
236
|
readonly context: TContext;
|
|
233
237
|
/**
|
|
234
|
-
*
|
|
238
|
+
* A custom object each resolver can read from/write to.
|
|
235
239
|
*/
|
|
236
240
|
readonly info: GraphQLResolveInfo;
|
|
237
241
|
/**
|
|
@@ -557,7 +561,7 @@ declare function inputToArgs(input: InputSchema<GraphQLSilk>): GraphQLFieldConfi
|
|
|
557
561
|
declare function ensureInputType(silkOrType: GraphQLType | GraphQLSilk): GraphQLInputType;
|
|
558
562
|
declare function ensureInputObjectType(object: GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType): GraphQLInputObjectType;
|
|
559
563
|
|
|
560
|
-
declare function ensureInterfaceType(gqlType: GraphQLOutputType, interfaceConfig?: GraphQLInterfaceTypeConfig<any, any
|
|
564
|
+
declare function ensureInterfaceType(gqlType: GraphQLOutputType, interfaceConfig?: Partial<GraphQLInterfaceTypeConfig<any, any>>): GraphQLInterfaceType;
|
|
561
565
|
|
|
562
566
|
interface GQLoomExtensions {
|
|
563
567
|
defaultValue?: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -205,9 +205,13 @@ declare function getSubscriptionOptions(subscribeOrOptions: (() => any) | Subscr
|
|
|
205
205
|
declare function getFieldOptions({ description, deprecationReason, extensions, }: GraphQLFieldOptions): GraphQLFieldOptions;
|
|
206
206
|
|
|
207
207
|
interface MiddlewarePayload<TField extends GenericFieldOrOperation = FieldOrOperation<any, any, any, any>> {
|
|
208
|
+
/** The Output Silk of the field */
|
|
208
209
|
outputSilk: InferSilkO<InferFieldOutput<TField>>;
|
|
210
|
+
/** The previous object, which for a field on the root Query type is often not used. */
|
|
209
211
|
parent: TField extends FieldOrOperation<infer TParent, any, any, any> ? TParent extends undefined ? undefined : InferSilkO<NonNullable<TParent>> : never;
|
|
212
|
+
/** A function to parse the input of the field */
|
|
210
213
|
parseInput: TField extends FieldOrOperation<any, any, infer TInput, any> ? CallableInputParser<TInput> : undefined;
|
|
214
|
+
/** The type of the field: `query`, `mutation`, `subscription` or `field` */
|
|
211
215
|
type: FieldOrOperationType;
|
|
212
216
|
}
|
|
213
217
|
type Middleware<TField extends GenericFieldOrOperation = FieldOrOperation<any, any, any, any>> = (next: () => MayPromise<InferSilkO<InferFieldOutput<TField>>>, payload: MiddlewarePayload<TField>) => MayPromise<InferSilkO<InferFieldOutput<TField>>>;
|
|
@@ -223,7 +227,7 @@ interface ResolverPayload<TContext extends object = object, TField extends Field
|
|
|
223
227
|
*/
|
|
224
228
|
readonly root: any;
|
|
225
229
|
/**
|
|
226
|
-
* The
|
|
230
|
+
* The arguments provided to the field in the GraphQL query.
|
|
227
231
|
*/
|
|
228
232
|
readonly args: Record<string, any>;
|
|
229
233
|
/**
|
|
@@ -231,7 +235,7 @@ interface ResolverPayload<TContext extends object = object, TField extends Field
|
|
|
231
235
|
*/
|
|
232
236
|
readonly context: TContext;
|
|
233
237
|
/**
|
|
234
|
-
*
|
|
238
|
+
* A custom object each resolver can read from/write to.
|
|
235
239
|
*/
|
|
236
240
|
readonly info: GraphQLResolveInfo;
|
|
237
241
|
/**
|
|
@@ -557,7 +561,7 @@ declare function inputToArgs(input: InputSchema<GraphQLSilk>): GraphQLFieldConfi
|
|
|
557
561
|
declare function ensureInputType(silkOrType: GraphQLType | GraphQLSilk): GraphQLInputType;
|
|
558
562
|
declare function ensureInputObjectType(object: GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType): GraphQLInputObjectType;
|
|
559
563
|
|
|
560
|
-
declare function ensureInterfaceType(gqlType: GraphQLOutputType, interfaceConfig?: GraphQLInterfaceTypeConfig<any, any
|
|
564
|
+
declare function ensureInterfaceType(gqlType: GraphQLOutputType, interfaceConfig?: Partial<GraphQLInterfaceTypeConfig<any, any>>): GraphQLInterfaceType;
|
|
561
565
|
|
|
562
566
|
interface GQLoomExtensions {
|
|
563
567
|
defaultValue?: any;
|