From 8d38fa166275e47f8a2c0c848c6f9372cf3f6802 Mon Sep 17 00:00:00 2001
From: Jure Triglav <juretriglav@gmail.com>
Date: Sat, 4 Jul 2020 01:02:28 +0200
Subject: [PATCH] fix: temporarily re-add non-paginated query

---
 server/model-user/src/graphql.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/model-user/src/graphql.js b/server/model-user/src/graphql.js
index ae71cd4aa3..2cc0698de9 100644
--- a/server/model-user/src/graphql.js
+++ b/server/model-user/src/graphql.js
@@ -8,7 +8,10 @@ const resolvers = {
     user(_, { id }, ctx) {
       return ctx.connectors.User.fetchOne(id, ctx, { eager })
     },
-    async users(_, { sort, offset, limit, filter }, ctx) {
+    async users(_, vars, ctx) {
+      return ctx.connectors.User.model.query()
+    },
+    async paginatedUsers(_, { sort, offset, limit, filter }, ctx) {
       const query = ctx.connectors.User.model.query()
 
       if (filter && filter.admin) {
@@ -159,7 +162,8 @@ const resolvers = {
 const typeDefs = `
   extend type Query {
     user(id: ID, username: String): User
-    users(sort: UsersSort, offset: Int, limit: Int, filter: UsersFilter): PaginatedUsers
+    users: [User]
+    paginatedUsers(sort: UsersSort, offset: Int, limit: Int, filter: UsersFilter): PaginatedUsers
     searchUsers(teamId: ID, query: String): [User]
   }
 
-- 
GitLab