File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
packages/services/api/src/modules/organization/providers Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
' hive ' : minor
3
3
---
4
4
5
- Increase the amount of organization users returned by default from 100 to 200 .
5
+ Return all users by default if no ` first ` value is provided for the ` Organization.members ` field .
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export class OrganizationMembers {
172
172
organization . id ,
173
173
) ;
174
174
175
- const first = args . first ?? 200 ;
175
+ const first = args . first ;
176
176
const cursor = args . after ? decodeCreatedAtAndUUIDIdBasedCursor ( args . after ) : null ;
177
177
178
178
const query = sql `
@@ -199,14 +199,14 @@ export class OrganizationMembers {
199
199
"om"."organization_id" DESC
200
200
, "om"."user_id" DESC
201
201
, "om"."user_id" DESC
202
- LIMIT ${ first + 1 }
202
+ ${ first ? sql ` LIMIT ${ first + 1 } ` : sql `` }
203
203
` ;
204
204
205
205
const result = await this . pool . any < unknown > ( query ) ;
206
- const hasNextPage = result . length > first ;
206
+ const hasNextPage = first !== null ? result . length > first : false ;
207
207
208
208
const organizationMembers = result
209
- . slice ( 0 , first )
209
+ . slice ( 0 , first ?? undefined )
210
210
. map ( row => RawOrganizationMembershipModel . parse ( row ) ) ;
211
211
const mapping = await this . resolveMemberships ( organization , organizationMembers ) ;
212
212
You can’t perform that action at this time.
0 commit comments