Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pothos/packages/core/fieldUtils/input.ts>InputFieldBuilder

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Latest
class InputFieldBuilder
import { InputFieldBuilder } from "https://deno.land/x/pothos@release-1730496474/packages/core/fieldUtils/input.ts";

Constructors

new
InputFieldBuilder(builder: PothosSchemaTypes.SchemaBuilder<Types>, kind: Kind)

Type Parameters

Types extends SchemaTypes
Kind extends keyof PothosSchemaTypes.InputFieldOptionsByKind

Properties

boolean

Create a Boolean input field

booleanList

Create a Boolean list input field

builder: PothosSchemaTypes.SchemaBuilder<Types>
float

Create a Float input field

floatList

Create a Float list input field

id

Create a ID input field

idList

Create a ID list input field

int

Create a Int input field

intList

Create a Int list input field

kind: Kind
listRef: <T extends InputTypeParam<Types>, Required extends boolean = true>(type: T, options?: { required?: Required; }) => InputListRef<Types, InputShapeFromTypeParam<Types, T, Required>[]>
string

Create a String input field

stringList

Create a String list input field

Methods

private
helper<Type extends InputType<Types> | [InputType<Types>]>(type: Type)
field<Type extends InputType<Types> | [InputType<Types>], Req extends FieldRequiredness<Type>>(options: PothosSchemaTypes.InputFieldOptionsByKind<Types, Type, Req>[Kind]): InputOrArgRef<Types, InputShapeFromTypeParam<Types, Type, Req>, Kind>

Create in input field or argument for the current type