Graph QL POC (#6024)

* First approach

* Lint

* Fixes and adding monitoring console statements (to be removed later)

* Add pagination and apply graphQL also to login

* Get all entry points to use the same GQL call

* Unify gql handling

* Use graphQL on websocket reconnect

* Handle latest changes regarding categories

* Use graphQL to properly fetch channel members on other servers

* Remove logs and fetch unreads from other teams

* Minor fixes

* Final fixes

* Address feedback, minor refactoring, and fixes around the refactor

* Fix custom status duration types

* Add missing fields and some reordering

* Add timeout to fetch posts for unread channels
This commit is contained in:
Daniel Espino García
2022-07-29 16:28:32 +02:00
committed by GitHub
parent 6c5043d598
commit bae5477b35
28 changed files with 1408 additions and 158 deletions

View File

@@ -33,7 +33,7 @@ export const transformUserRecord = ({action, database, value}: TransformerArgs):
user.firstName = raw.first_name;
user.isGuest = raw.roles.includes('system_guest');
user.lastName = raw.last_name;
user.lastPictureUpdate = raw.last_picture_update;
user.lastPictureUpdate = raw.last_picture_update || 0;
user.locale = raw.locale;
user.nickname = raw.nickname;
user.position = raw?.position ?? '';
@@ -41,7 +41,7 @@ export const transformUserRecord = ({action, database, value}: TransformerArgs):
user.username = raw.username;
user.notifyProps = raw.notify_props;
user.timezone = raw.timezone || null;
user.isBot = raw.is_bot;
user.isBot = raw.is_bot ?? false;
user.remoteId = raw?.remote_id ?? null;
if (raw.status) {
user.status = raw.status;