Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/pothos/packages/core/fieldUtils/builder.ts>default#exposeInt

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

Create an Int field from a numeric property on the parent object

Type Parameters

Name extends CompatibleTypes<Types, ParentShape, "Int", true>
ResolveReturnShape
optional
Nullable extends FieldNullability<"Int"> = Types["DefaultFieldNullability"]

Parameters

name: Name
  • the name of the property on the source object (does not need to match the field name).
...args: NormalizeArgs<[ExposeNullability<Types, "Int", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "Int", Nullable, { }, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type">]>
  • Options for this field