Vote / Unvote Proposal

Vote Proposal

To use the API to vote any proposal that is configured to receive votes, you will need to use the following API request.

mutation voteProposal($componentId: ID!, $proposalId: ID!){
  component(id: $componentId) {
    ...on ProposalsMutation{
      proposal(id: $proposalId) {
        vote(input: {}) {
        }
      }
    }
  }
}

Example of submitted variables

{
  "componentId": "9",
  "proposalId": "2"
}

Error Handling

The most frequent errors that can be generated by this mutation are as follows:

Unvote Proposal

To use the API to remove a vote on any proposal that you have already voted, you will need to use the following API request.

mutation unvoteProposal($componentId: ID!, $proposalId: ID!){
  component(id: $componentId) {
    ...on ProposalsMutation{
      proposal(id: $proposalId) {
        unvote(input: {}) {
        }
      }
    }
  }
}

Example of submitted variables

{
  "componentId": "9",
  "proposalId": "2"
}

Error Handling

The most frequent errors that can be generated by this mutation are as follows: