diff --git a/src/pages/proposals/ProposalList.vue b/src/pages/proposals/ProposalList.vue index fbb762e35..9902cd9e2 100644 --- a/src/pages/proposals/ProposalList.vue +++ b/src/pages/proposals/ProposalList.vue @@ -400,32 +400,32 @@ export default { } }, fetchPolicy: 'no-cache', - pollInterval: 1000, // TODO: Swap with subscribe once dgraph is ready - subscribeToMore: { - document: require('~/query/proposals/dao-proposals-active-vote-subs.gql'), - variables() { - return { - docId: this.selectedDao.docId, - // first: this.pagination.first, - // offset: 0, - user: this.account - } - }, - skip() { return !this.selectedDao?.docId }, - updateQuery: (previousResult, { subscriptionData }) => { - if (!subscriptionData?.data) { - return previousResult - } - if (!previousResult?.data) { - return undefined - } - subscriptionData.data.queryDao[0].proposal = [ - ...previousResult.data.queryDao[0].proposal, - ...subscriptionData.data.queryDao[0].proposal - ] - return subscriptionData - } - } + pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready + // subscribeToMore: { + // document: require('~/query/proposals/dao-proposals-active-vote-subs.gql'), + // variables() { + // return { + // docId: this.selectedDao.docId, + // // first: this.pagination.first, + // // offset: 0, + // user: this.account + // } + // }, + // skip() { return !this.selectedDao?.docId }, + // updateQuery: (previousResult, { subscriptionData }) => { + // if (!subscriptionData?.data) { + // return previousResult + // } + // if (!previousResult?.data) { + // return undefined + // } + // subscriptionData.data.queryDao[0].proposal = [ + // ...previousResult.data.queryDao[0].proposal, + // ...subscriptionData.data.queryDao[0].proposal + // ] + // return subscriptionData + // } + // } }, stagedProposals: { query: gql`query stageProposals($docId: String!, $first: Int!, $offset: Int!) { ${STAGED_PROPOSALS_QUERY} }`, @@ -441,30 +441,30 @@ export default { }, errorPolicy: 'all', fetchPolicy: 'no-cache', - // pollInterval: 1000, // TODO: Swap with subscribe once dgraph is ready - subscribeToMore: { - document: gql`subscription stageProposals($docId: String!, $first: Int, $offset: Int) { ${STAGED_PROPOSALS_QUERY} }`, - skip() { return !this.selectedDao?.docId }, - variables() { - return { - docId: this.selectedDao.docId, - user: this.account - } - }, - updateQuery: (previousResult, { subscriptionData }) => { - if (!subscriptionData?.data) { - return previousResult - } - if (!previousResult?.data) { - return undefined - } - subscriptionData.data.queryDao[0].stagingprop = [ - ...previousResult.data.queryDao[0].stagingprop, - ...subscriptionData.data.queryDao[0].stagingprop - ] - return subscriptionData - } - } + pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready + // subscribeToMore: { + // document: gql`subscription stageProposals($docId: String!, $first: Int, $offset: Int) { ${STAGED_PROPOSALS_QUERY} }`, + // skip() { return !this.selectedDao?.docId }, + // variables() { + // return { + // docId: this.selectedDao.docId, + // user: this.account + // } + // }, + // updateQuery: (previousResult, { subscriptionData }) => { + // if (!subscriptionData?.data) { + // return previousResult + // } + // if (!previousResult?.data) { + // return undefined + // } + // subscriptionData.data.queryDao[0].stagingprop = [ + // ...previousResult.data.queryDao[0].stagingprop, + // ...subscriptionData.data.queryDao[0].stagingprop + // ] + // return subscriptionData + // } + // } }, proposalsCount: {