Interface: QueryFactory()<TSchemaIO>

Function to create a GraphQL query.

Type Parameters

TSchemaIO extends AbstractSchemaIO

QueryFactory<TOutput, TInput>(output, resolveOrOptions): FieldOrOperation<undefined, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "query">

Function to create a GraphQL query.

Type Parameters

TOutput extends object

TInput extends undefined | object | Record<string, TSchemaIO[0]> = undefined

Parameters

output: TOutput

resolveOrOptions: QueryMutationOptions<TSchemaIO, TOutput, TInput> | () => MayPromise<InferPropertyType<TOutput, TSchemaIO[2]>>

Returns

FieldOrOperation<undefined, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "query">

Defined in

packages/core/src/resolver/types.ts:171