import type { InputFieldMap, InputShapeFromFields, SchemaTypes } from '@pothos/core'; import type { PrismaRef } from './interface-ref'; import type { PrismaModelTypes, ShapeFromSelection, UniqueFieldsFromWhereUnique } from './types'; export declare const prismaModelKey: unique symbol; export declare function prismaConnectionHelpers | keyof Types['PrismaTypes'], Select extends Model['Select'] & {}, Model extends PrismaModelTypes = RefOrType extends PrismaRef ? PrismaModelTypes & T : PrismaModelTypes & Types['PrismaTypes'][RefOrType & keyof Types['PrismaTypes']], Shape = RefOrType extends PrismaRef ? T : Model['Shape'], EdgeShape = Model['Include'] extends Select ? Shape : ShapeFromSelection, NodeShape = EdgeShape, ExtraArgs extends InputFieldMap = {}>(builder: PothosSchemaTypes.SchemaBuilder, refOrType: RefOrType, { cursor, select, resolveNode, query, args: createArgs, maxSize, defaultSize, }: { cursor: UniqueFieldsFromWhereUnique; select?: (nestedSelection: (selection?: T) => T, args: InputShapeFromFields & PothosSchemaTypes.DefaultConnectionArguments, ctx: Types['Context']) => Select; query?: ((args: InputShapeFromFields & PothosSchemaTypes.DefaultConnectionArguments, ctx: Types['Context']) => { where?: Model['Where']; orderBy?: Model['OrderBy']; }) | { where?: Model['Where']; orderBy?: Model['OrderBy']; }; defaultSize?: number | ((args: InputShapeFromFields & PothosSchemaTypes.DefaultConnectionArguments, ctx: Types['Context']) => number); maxSize?: number | ((args: PothosSchemaTypes.DefaultConnectionArguments, ctx: Types['Context']) => number); resolveNode?: (edge: EdgeShape) => NodeShape; args?: (t: PothosSchemaTypes.InputFieldBuilder) => ExtraArgs; }): { ref: PrismaRef; resolve: (list: (EdgeShape & {})[], args: InputShapeFromFields & PothosSchemaTypes.DefaultConnectionArguments, ctx: Types["Context"], parent?: Parent) => { edges: (Omit & { node: NodeShape; cursor: string; })[]; pageInfo: { startCursor: string | null; endCursor: string | null; hasPreviousPage: boolean; hasNextPage: boolean; }; }; select: {}; getQuery: (args: InputShapeFromFields & PothosSchemaTypes.DefaultConnectionArguments, ctx: Types["Context"], nestedSelection: (selection?: T, path?: string[]) => T) => (Model["Select"] extends Select ? {} : { select: Select; }) & { where?: Model["Where"]; orderBy?: Model["OrderBy"]; skip?: number; take?: number; cursor?: Model["WhereUnique"]; }; getArgs: () => ExtraArgs; }; //# sourceMappingURL=connection-helpers.d.ts.map