Function: query()

query<TOutput, TInput>(output, resolveOrOptions): FieldOrOperation<undefined, SchemaToSilk<GraphQLSilkIO | YupSchemaIO, TOutput>, InputSchemaToSilk<GraphQLSilkIO | YupSchemaIO, TInput>, "query">

Type Parameters

TOutput extends GraphQLSilk<any, any> | Schema<any, any, any, "">

TInput extends InputSchema<GraphQLSilk<any, any> | Schema<any, any, any, "">> = undefined

Parameters

output: TOutput

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

Returns

FieldOrOperation<undefined, SchemaToSilk<GraphQLSilkIO | YupSchemaIO, TOutput>, InputSchemaToSilk<GraphQLSilkIO | YupSchemaIO, TInput>, "query">

Defined in

packages/yup/src/index.ts:383