Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get weights of direct & indirect delegations #252

Open
jinjagit opened this issue May 11, 2021 · 1 comment
Open

Get weights of direct & indirect delegations #252

jinjagit opened this issue May 11, 2021 · 1 comment

Comments

@jinjagit
Copy link
Member

We wish to show a user (of Decidim, in #56) the user's voting weight, which may increase (from a base of 1) due to delegations 'received'.

We also wish to show the user how much of this voting weight is due to direct delegations (delegations where the user has been chosen as a delegate), and how much is due to indirect delegations (voting weight delegated to someone earlier in a delegation chains that have been passed on to the user though subsequent delegation(s)).

Thus, we need absinthe queries / a query that will return these values for a given user.

This will also involve developing separate core functions to perform the needed db queries & calculations. Note that currently, update_vote_weight(vote) in lib/liquid_voting/voting_weight.ex does not differentiate between direct and indirect delegations.

@oliverbarnes oliverbarnes changed the title Add absinthe queries to get weights of direct & indirect delegations to a user. Get weights of direct & indirect delegations May 11, 2021
@oliverbarnes
Copy link
Member

(Edited issue title to remove implementation detail and just leave concise intent. Makes it easier to parse issues lists)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants