Interface: FieldFactory()<TSchemaIO>

Function to create a GraphQL Field.

Extended by

Type Parameters

TSchemaIO extends AbstractSchemaIO

FieldFactory<TParent, TOutput, TInput>(output, resolveOrOptions): FieldOrOperation<SchemaToSilk<TSchemaIO, TParent>, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "field">

Function to create a GraphQL Field.

Type Parameters

TParent extends object

TOutput extends object

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

Parameters

output: TOutput

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

Returns

FieldOrOperation<SchemaToSilk<TSchemaIO, TParent>, SchemaToSilk<TSchemaIO, TOutput>, InputSchemaToSilk<TSchemaIO, TInput>, "field">

Defined in

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