Skip to content

Commit bdd88f6

Browse files
committed
Set min number of users
1 parent 70f2bfd commit bdd88f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/resolvers/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export default {
9797
allPosts: (parent, { count }, { faker }) => {
9898
const usersToUse = predefinedUsers.slice(
9999
0,
100-
count > 200 ? Math.ceil(count / 50) : Math.ceil(count / 20),
100+
Math.min(
101+
4,
102+
count > 200 ? Math.ceil(count / 50) : Math.ceil(count / 20),
103+
),
101104
)
102105
return new Array(count).fill(0).map((_) => {
103106
const title = faker.random.words()

0 commit comments

Comments
 (0)