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#expose

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

Create a field that resolves to a property of the corresponding type on the parent object

Type Parameters

Type extends TypeParam<Types>
Nullable extends FieldNullability<Type>
ResolveReturnShape
Name extends CompatibleTypes<Types, ParentShape, Type, Type extends [unknown] ? { list: true; items: true; } : true>

Parameters

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