liquidvotingio / liquidvotingio/decidim-module-liquidvoting

Use absinthe query to find a vote by user email & proposal url

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In `api_client.rb` there is a private method `user_voted?(participant_email, proposal_url)` that currently retrieves all LV votes and then filters locally on mail and url.

Instead we need a parameterized query to just return the vote(s) of interest. Once this is repaired, we can probably pull up the private into the public method used to expose the call. The api-side of this problem is in issue https://github.com/liquidvotingio/api/issues/230.

This same exact problem for finding a delegate is in issue #21 (`api_client.rb`) and https://github.com/liquidvotingio/api/issues/163 (api side).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in api_client.rb at the private user_voted?(participant_email, proposal_url) method, then review API issue 230 for the server-side query requirements. Replace the local filtering of all LV votes with a parameterized query that returns only votes matching the email and proposal URL, and confirm the existing public call still exposes the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, ruby
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.