GraphQL support for PollVote mutation

Created on 7 January 2020, almost 5 years ago
Updated 10 September 2024, 2 months ago

Problem/Motivation
GraphlQL does not support the mutation for inserting Poll Vote

Proposed resolution
1) Create a separate module which supports the PollVoteCreateInput mutation for adding votes.
2) Make a new PollVote Entity in Poll module which will be then supported by GraphQL.

Code is posted in the graphql poll vote sandbox for review and feedback.

Feature request
Status

Postponed

Version

2.0

Component

Miscellaneous

Created by

🇮🇳India RoshniPatel.addweb

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    I assume there is some overlap here with #3042995: Convert votes into entities about the vote entity. I guess it makes sense to land that one first.

    I have no objections to add this as a submodule. However I would like to:
    - See some tests for this as well
    - See this rebased for 2.0.x
    - See a MR for this.
    - See documentation for this.

  • This proposed code does not work with graphql4.

    It does work with the pre-2.0 Poll and gql3.

    Looking at the code, I'm guessing it's going to be better to use schema extensions and data producers rather than creating its own Entity and adding fields to polls like the current implementation does.

    It'd be nice to be compatible with graphql_core_schema as well (there's core_compose as well, but my project is using core_schema).

Production build 0.71.5 2024