Pothos GraphQL



  • options: [FieldOptions]


type FieldOptions = {
  type: ReturnType;
  required?: boolean;
  description?: string;
  deprecationReason?: string;
  • type: Type Parameter

  • required: boolean, defaults to false, unless overwritten in SchemaBuilder see

    Changing Default Nullability.

  • description: string

  • defaultValue: default value for field, type based on type option.

Type Parameter

A Type Parameter for a Field can be any InputTypeRef returned by one of the SchemaBuilder methods for defining an InputObject, Enum, or Scalar, a ts enum used to define a graphql enum type, or a string that corresponds to one of they keys of the Scalars object defined in SchemaTypes.


A set of helpers for creating scalar fields. This work the same as ArgBuilder, but omit the type field from options.


  • arg.string(options)
  • arg.id(options)
  • arg.boolean(options)
  • arg.int(options)
  • arg.float(options)
  • arg.stringList(options)
  • arg.idList(options)
  • arg.booleanList(options)
  • arg.intList(options)
  • arg.floatList(options)
  • arg.listRef(type, options)