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

x/pothos/packages/plugin-relay/utils/connections.ts>resolveOffsetConnection

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
function resolveOffsetConnection
import { resolveOffsetConnection } from "https://deno.land/x/pothos@release-1725301526/packages/plugin-relay/utils/connections.ts";

Type Parameters

T
U extends Promise<readonly T[] | null> | readonly T[] | null

Parameters

options: ResolveOffsetConnectionOptions
resolve: (params: { offset: number; limit: number; }) => U & (MaybePromise<readonly T[] | null> | null)

Returns

Promise<RemoveMaybePromiseProps<ConnectionShape<SchemaTypes, NonNullable<T>, U extends NonNullable<U> ? (Promise<null> extends U ? true : false) : true, T extends NonNullable<T> ? false : { list: false; items: true; }, false>>>