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

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

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Latest
type alias RelayPluginOptions
import { type RelayPluginOptions } from "https://deno.land/x/pothos@release-1730496474/packages/plugin-relay/types.ts";
definition: EmptyToOptional<{ idFieldName?: string; idFieldOptions?: Partial<Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID", boolean, { }, PageInfoShape>,
| "args"
| "nullable"
| "type"
>>; clientMutationId?: "omit" | "optional" | "required"; cursorType?: "ID" | "String"; edgeCursorType?: "ID" | "String"; pageInfoCursorType?: "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: ArgumentRef<Types, { typename: string; id: string; }>; }, Promise<unknown>>, "args" | "type" | InferredFieldOptionKeys> & { 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: { typename: string; id: string; }) => MaybePromise<unknown>,
) => MaybePromise<unknown>; })
; nodesQueryOptions: false | (Omit<PothosSchemaTypes.QueryFieldOptions<Types, [OutputRefShape<GlobalIDShape<Types> | string>], FieldNullability<[unknown]>, { ids: ArgumentRef<Types, { typename: string; id: string; }[]>; }, Promise<unknown>[]>, "args" | "type" | InferredFieldOptionKeys> & { 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" | "type" | InferredFieldOptionKeys>; cursorFieldOptions: Normalize<Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID" | "String", false, { }, Types["Scalars"]["ID" | "String"]["Output"]>, "args" | "type" | InferredFieldOptionKeys> & { type?: "ID" | "String"; }>; nodeFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, ObjectRef<Types, { }>, Types["DefaultNodeNullability"], { }, GlobalIDShape<Types> | string>,
| "args"
| "nullable"
| "type"
> & { nullable?: Types["DefaultNodeNullability"]; }; edgesFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<Types, { }>], Types["DefaultEdgesNullability"], { }, unknown[]>,
| "args"
| "nullable"
| "type"
> & { nullable?: Types["DefaultEdgesNullability"]; }; nodesFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<Types, { }>], FieldNullability<[unknown]>, { }, unknown[]>, "args" | "type" | InferredFieldOptionKeys>; pageInfoFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, OutputRef<PageInfoShape>, boolean, { }, PageInfoShape>, "args" | "type" | InferredFieldOptionKeys>; hasNextPageFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "Boolean", boolean, { }, boolean>, "args" | "type" | InferredFieldOptionKeys>; hasPreviousPageFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "Boolean", boolean, { }, boolean>, "args" | "type" | InferredFieldOptionKeys>; startCursorFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "ID" | "String", boolean, { }, string | null>, "args" | "type" | InferredFieldOptionKeys>; endCursorFieldOptions: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, PageInfoShape, "ID" | "String", boolean, { }, string | null>, "args" | "type" | InferredFieldOptionKeys>; 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<Types, DefaultConnectionArguments, "Arg">, ConnectionShape<Types, unknown, false, true, true>>, "args" | "type" | InferredFieldOptionKeys>; nodesOnConnection?: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<Types, { }>], { list: false; items: Types["DefaultNodeNullability"]; }, { }, GlobalIDShape<Types> | string>,
| "args"
| "nullable"
| "type"
> | boolean
; }>