Function: field()

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

Type Parameters

TParent extends GraphQLSilk<any, any>

TOutput extends GraphQLSilk<any, any>

TInput extends InputSchema<GraphQLSilk<any, any>> = undefined

Parameters

output: TOutput

resolveOrOptions: FieldOptions<GraphQLSilkIO, TParent, TOutput, TInput> | (parent) => MayPromise<"~standard" extends keyof TOutput ? "types" extends keyof NonNullable<TOutput[keyof TOutput & "~standard"]> ? "output" extends keyof NonNullable<NonNullable<...[...]>[keyof ... & "types"]> ? NonNullable<NonNullable<...[...]>[keyof ... & "types"]>[keyof NonNullable<...[...]> & "output"] : never : never : never>

Returns

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

Defined in

packages/core/src/resolver/resolver.ts:92