File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,15 @@ describe('preparePaginationResolver()', () => {
5656 } )
5757 ) . toThrowError ( "'opts.findManyResolver' must be a Resolver instance" ) ;
5858 } ) ;
59+
60+ it ( 'should return a separate resolver with different type' , ( ) => {
61+ const anotherPaginationResolver = preparePaginationResolver ( UserTC , {
62+ countResolver,
63+ findManyResolver,
64+ name : 'otherPagination' ,
65+ } ) ;
66+ expect ( anotherPaginationResolver . getTypeName ( ) ) . toBe ( 'UserOtherPagination' ) ;
67+ } ) ;
5968 } ) ;
6069
6170 describe ( 'resolver basic properties' , ( ) => {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export function preparePaginationResolver<TSource, TContext>(
8585 }
8686
8787 return tc . schemaComposer . createResolver ( {
88- type : preparePaginationTC ( tc ) ,
88+ type : preparePaginationTC ( tc , resolverName ) ,
8989 name : resolverName ,
9090 kind : 'query' ,
9191 args : {
You can’t perform that action at this time.
0 commit comments