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

x/pothos/packages/plugin-relay/index.ts>RelayPluginOptions

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
type alias RelayPluginOptions
import { type RelayPluginOptions } from "https://deno.land/x/pothos@release-1695354039/packages/plugin-relay/index.ts";
definition: EmptyToOptional<{ idFieldName?: string; idFieldOptions?: Partial<Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID", boolean, { }, PageInfoShape>,
| "args"
| "resolve"
| "type"
| "nullable"
>>; clientMutationId?: "omit" | "optional" | "required"; cursorType?: "ID" | "String"; brandLoadedObjects?: boolean; nodeTypeOptions: Omit<PothosSchemaTypes.InterfaceTypeOptions<Types, unknown>, "fields">; pageInfoTypeOptions: Omit<PothosSchemaTypes.ObjectTypeOptions<Types, PageInfoShape>, "fields">; nodeQueryOptions: false | (Omit<PothosSchemaTypes.QueryFieldOptions<Types, OutputRefShape<GlobalIDShape<Types> | string>, boolean, { id: InputFieldRef<InputShape<Types, "ID">>; }, Promise<unknown>>, "args" | "resolve" | "type"> & { args?: { id?: Omit<GlobalIDInputFieldOptions<Types, true, "Arg", ObjectParam<Types>>, "required">; }; resolve?: (
parent: Types["Root"],
args: { id: { typename: string; id: string; }; },
context: Types["Context"],
resolveNode: (id: { id: string; typename: string; }) => MaybePromise<unknown>,
) => MaybePromise<unknown>; })
; nodesQueryOptions: false | (Omit<PothosSchemaTypes.QueryFieldOptions<Types, [OutputRefShape<GlobalIDShape<Types> | string>], FieldNullability<[unknown]>, { ids: InputFieldRef<InputShape<Types, "ID">[]>; }, Promise<unknown>[]>, "args" | "resolve" | "type"> & { args?: { ids?: Omit<GlobalIDListInputFieldOptions<Types, true, "Arg", ObjectParam<Types>>, "required">; }; resolve?: (
parent: Types["Root"],
args: { ids: { typename: string; id: string; }[]; },
context: Types["Context"],
resolveNodes: (ids: { id: string; typename: string; }[]) => Promise<unknown[]>,
) => MaybePromise<readonly MaybePromise<unknown>[]>; })
; mutationInputArgOptions: Omit<PothosSchemaTypes.ArgFieldOptions<Types, InputRef<{ }>, boolean>, "fields" | "type">; clientMutationIdInputOptions: Omit<PothosSchemaTypes.InputObjectFieldOptions<Types, "ID", boolean>, "type">; clientMutationIdFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID", boolean, { }, Types["Scalars"]["ID"]["Output"]>, "args" | "resolve" | "type">; cursorFieldOptions: Normalize<Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID" | "String", false, { }, Types["Scalars"]["ID" | "String"]["Output"]>, "args" | "resolve" | "type"> & { type?: "ID" | "String"; }>; nodeFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, ObjectRef<{ }>, Types["DefaultNodeNullability"], { }, GlobalIDShape<Types> | string>,
| "args"
| "nullable"
| "resolve"
| "type"
> & { nullable?: Types["DefaultNodeNullability"]; }; edgesFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<{ }>], Types["DefaultEdgesNullability"], { }, unknown[]>,
| "args"
| "resolve"
| "nullable"
| "type"
> & { nullable?: Types["DefaultEdgesNullability"]; }; pageInfoFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, OutputRef<PageInfoShape>, boolean, { }, PageInfoShape>, "args" | "resolve" | "type">; hasNextPageFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "Boolean", boolean, { }, boolean>, "args" | "resolve" | "type">; hasPreviousPageFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "Boolean", boolean, { }, boolean>, "args" | "resolve" | "type">; startCursorFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "ID" | "String", boolean, { }, string | null>, "args" | "resolve" | "type">; endCursorFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "ID" | "String", boolean, { }, string | null>, "args" | "resolve" | "type">; beforeArgOptions: Omit<PothosSchemaTypes.InputObjectFieldOptions<Types, "ID" | "String", boolean>, "required" | "type">; afterArgOptions: Omit<PothosSchemaTypes.InputObjectFieldOptions<Types, "ID" | "String", boolean>, "required" | "type">; firstArgOptions: Omit<PothosSchemaTypes.InputObjectFieldOptions<Types, "Int", boolean>, "required" | "type">; lastArgOptions: Omit<PothosSchemaTypes.InputObjectFieldOptions<Types, "Int", boolean>, "required" | "type">; encodeGlobalID?: (
typename: string,
id: bigint | number | string,
ctx: Types["Context"],
) => string; decodeGlobalID?: (globalID: string, ctx: Types["Context"]) => { typename: string; id: string; }; defaultConnectionTypeOptions: Partial<PothosSchemaTypes.ObjectTypeOptions<Types, ConnectionShape<Types, unknown, false, true, true>>>; defaultEdgeTypeOptions: Partial<PothosSchemaTypes.ObjectTypeOptions<Types, { cursor: string; node: unknown; }>>; defaultPayloadTypeOptions: Partial<PothosSchemaTypes.ObjectTypeOptions<Types, { }>>; defaultMutationInputTypeOptions: Partial<Omit<PothosSchemaTypes.InputObjectTypeOptions<Types, { }>, "fields">>; defaultConnectionFieldOptions?: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, OutputRef<ConnectionShape<Types, unknown, false, true, true>>, boolean, InputFieldsFromShape<DefaultConnectionArguments>, ConnectionShape<Types, unknown, false, true, true>>, "args" | "resolve" | "type">; nodesOnConnection?: boolean | Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<{ }>], { list: false; items: Types["DefaultNodeNullability"]; }, { }, GlobalIDShape<Types> | string>,
| "args"
| "nullable"
| "resolve"
| "type"
>
; }>