File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1313 "es" : {
1414 "plugins" : [
1515 " syntax-async-functions" ,
16- " transform-regenerator" ,
16+ [" transform-regenerator" , {
17+ "async" : false ,
18+ }],
1719 " transform-class-properties" ,
1820 " transform-object-rest-spread" ,
1921 " transform-flow-strip-types" ,
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ export function prepareConnectionResolver(
102102 findManyParams . args . filter = filter ;
103103
104104
105- let first = parseInt ( args . first , 10 ) ;
106- const last = parseInt ( args . last , 10 ) ;
105+ let first = parseInt ( args . first , 10 ) || 0 ;
106+ const last = parseInt ( args . last , 10 ) || 0 ;
107107
108108 if ( projection . count ) {
109109 countPromise = countResolve ( findManyParams ) ;
@@ -114,11 +114,12 @@ export function prepareConnectionResolver(
114114 }
115115
116116 if ( ! first && last ) {
117- first = ( await countPromise ) || 0 ;
117+ first = await countPromise ;
118+ first = parseInt ( first , 10 ) || 0 ;
118119 }
119120
120121 const limit = first ;
121- const skip = ( first - last ) || 0 ;
122+ const skip = first - last ;
122123
123124 findManyParams . args . limit = limit + 1 ; // +1 document, to check next page presence
124125 if ( skip > 0 ) {
You can’t perform that action at this time.
0 commit comments