From dd8b97728f00a45a6e76ea50bce2ed330e553546 Mon Sep 17 00:00:00 2001 From: Evgeni B Date: Thu, 21 Mar 2024 06:44:02 -0700 Subject: [PATCH 1/2] fix(members): applicants loading (#2591) --- src/pages/dho/Members.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/dho/Members.vue b/src/pages/dho/Members.vue index 8889ca3e6..92ab090a8 100644 --- a/src/pages/dho/Members.vue +++ b/src/pages/dho/Members.vue @@ -402,11 +402,11 @@ export default { onChange (name, value) { this.$set(this, name, value) }, - loadMoreDaoApplicants (page, done) { + async loadMoreDaoApplicants (page, done) { + this.isLoadingDaoApplicants = true if (this.daoApplicants?.length === this.applicantsCount) { done(true) } - this.applicantsPagination.page += 1 this.$apollo.queries.daoApplicants?.fetchMore({ @@ -418,8 +418,6 @@ export default { filter: this.filterObject }, updateQuery: (previousResult, { fetchMoreResult }) => { - done() - return { getDao: { __typename: fetchMoreResult.getDao.__typename, From f487a76ab51fb7f7cc0ced957600c56b0f565bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsenije=20Savi=C4=87?= Date: Thu, 21 Mar 2024 07:48:38 -0600 Subject: [PATCH 2/2] feat(apollo): add access yoken to the ws link --- src/apollo/apollo-client-hooks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apollo/apollo-client-hooks.js b/src/apollo/apollo-client-hooks.js index 2f3aa31e3..2fa036be5 100644 --- a/src/apollo/apollo-client-hooks.js +++ b/src/apollo/apollo-client-hooks.js @@ -66,6 +66,7 @@ const wsLink = new WebSocketLink({ process.env.GRAPHQL_URI.replace('https', 'wss') || 'wss://alpha-stts.tekit.io/graphql', options: { + connectionParams: { 'X-Dgraph-AccessToken': localStorage.getItem(hyphaAccessTokenKey) }, reconnect: true } })