import { DMMF } from '@prisma/client/runtime' ; import { InternalDMMF } from '../dmmf' ; import { prismaStrategy } from './prisma' ; import { relayStrategy } from './relay' ; interface NormalizedPaginationArgs { cursor ? : object ; skip ? : string | number ; take ? : string | number ; orderBy ? : { [ x ] : 'asc' | 'desc' ; } ; [ x ] : any ; } export interface PaginationStrategy < GraphQLPaginationArgs extends object = object > { paginationArgNames : ( keyof GraphQLPaginationArgs ) [ ] ; transformDmmfArgs ( params ) : InternalDMMF . SchemaArg [ ] ; resolve ( args ) : NormalizedPaginationArgs ; } interface PaginationStrategies { relay : typeof relayStrategy ; prisma : typeof prismaStrategy ; } export const paginationStrategies = { relay : relayStrategy , prisma : prismaStrategy , } ; export type PaginationStrategyTypes = typeof relayStrategy | typeof prismaStrategy ;