Skip to main content
Module

x/pothos/packages/core/fieldUtils/root.ts>RootFieldBuilder#field

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
method RootFieldBuilder.prototype.field
import { RootFieldBuilder } from "https://deno.land/x/pothos@release-1720765432/packages/core/fieldUtils/root.ts";

create a new field for the current type

Type Parameters

Type extends TypeParam<Types>
ResolveShape
ResolveReturnShape
optional
Nullable extends FieldNullability<Type> = Types["DefaultFieldNullability"]
optional
Args extends InputFieldMap = { }

Parameters

options: FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args, Kind, ResolveShape, ResolveReturnShape>
  • options for this field