File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11import { ObjectTypeComposer } from 'graphql-compose' ;
22import {
33 preparePaginationResolver ,
4- ComposeWithPaginationOpts ,
4+ PaginationResolverOpts ,
55 DEFAULT_RESOLVER_NAME ,
66} from './pagination' ;
77
8+ /**
9+ * @deprecated use `preparePaginationResolver()` instead
10+ */
811export function composeWithPagination < TSource , TContext > (
912 typeComposer : ObjectTypeComposer < TSource , TContext > ,
10- opts : ComposeWithPaginationOpts
13+ opts : PaginationResolverOpts
1114) : ObjectTypeComposer < TSource , TContext > {
1215 if ( ! typeComposer || typeComposer . constructor . name !== 'ObjectTypeComposer' ) {
1316 throw new Error (
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { composeWithPagination } from './composeWithPagination';
44export { composeWithPagination , preparePaginationResolver } ;
55
66export type {
7- ComposeWithPaginationOpts ,
7+ PaginationResolverOpts ,
88 PaginationTArgs ,
99 PaginationType ,
1010 PaginationInfoType ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { preparePaginationTC } from './types';
99export const DEFAULT_RESOLVER_NAME = 'pagination' ;
1010export const DEFAULT_PER_PAGE = 20 ;
1111
12- export type ComposeWithPaginationOpts = {
12+ export type PaginationResolverOpts = {
1313 findManyResolver : Resolver ;
1414 countResolver : Resolver ;
1515 name ?: string ;
@@ -40,7 +40,7 @@ export interface PaginationTArgs {
4040
4141export function preparePaginationResolver < TSource , TContext > (
4242 tc : ObjectTypeComposer < TSource , TContext > ,
43- opts : ComposeWithPaginationOpts
43+ opts : PaginationResolverOpts
4444) : Resolver < TSource , TContext , PaginationTArgs > {
4545 if ( ! tc || tc . constructor . name !== 'ObjectTypeComposer' ) {
4646 throw new Error (
You can’t perform that action at this time.
0 commit comments