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
Go to Latest
type alias RelayPluginOptions
import { type RelayPluginOptions } from "https://dotland.deno.dev/x/pothos@release-1713397530/packages/plugin-relay/types.ts";
definition: EmptyToOptional<{ idFieldName?: string; idFieldOptions?: Partial<Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, "ID", boolean, { }, PageInfoShape>,
| "args"
| "nullable"
| "resolve"
| "type"
>>; 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<{ typename: string; id: string; }>; }, 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: { typename: string; id: string; }) => MaybePromise<unknown>,
) => MaybePromise<unknown>; })
; nodesQueryOptions: false | (Omit<PothosSchemaTypes.QueryFieldOptions<Types, [OutputRefShape<GlobalIDShape<Types> | string>], FieldNullability<[unknown]>, { ids: InputFieldRef<{ typename: string; id: string; }[]>; }, 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"
| "nullable"
| "resolve"
| "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?: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, { }, [ObjectRef<{ }>], { list: false; items: Types["DefaultNodeNullability"]; }, { }, GlobalIDShape<Types> | string>,
| "args"
| "nullable"
| "resolve"
| "type"
> | boolean
; }>