diff --git a/src/services/Users.js b/src/services/Users.js index beec3d5..b1326fa 100644 --- a/src/services/Users.js +++ b/src/services/Users.js @@ -22,6 +22,9 @@ export default class Users { } static async findMany({ ids }) { + if (!ids) { + return prisma.user.findMany(); + } return prisma.user.findMany({ where: { id: { diff --git a/src/typeDefs/User.js b/src/typeDefs/User.js index 6a9abaf..661f842 100644 --- a/src/typeDefs/User.js +++ b/src/typeDefs/User.js @@ -13,7 +13,7 @@ const typeDefs = gql` type Query { user(id: ID!): User - users(ids: [ID]!): [User] + users(ids: [ID]): [User] } type Mutation {