Vote
One row per roll call vote event. The vote_id is the canonical identifier from unitedstates/congress (e.g. h202-113.2013).
GraphQL type: Vote · Connection: VotesConnection
Queries
| Query | Returns | Description |
|---|---|---|
allVotes(filter, orderBy, first, last, before, after) | VotesConnection | Paginated list with filtering and ordering |
voteById(id: BigInt!) | Vote | Look up by primary key |
voteByVoteId(voteId: String!) | Vote | Look up by unique voteId |
Fields
| Field | GraphQL Type | Notes |
|---|---|---|
id | BigInt | PK |
voteId | String | Canonical vote identifier in the form [chamber][number]-[congress].[session], e.g. h202-113.2013. unique required |
chamber | String | required. One of: h, s |
congress | Int | required |
session | String | Calendar year string. Sessions roughly follow calendar years but are bounded by Congress start/end dates. required |
number | Int | required |
votedAt | Datetime | |
question | String | |
voteType | String | |
category | String | Normalised vote category. One of: passage, amendment, cloture, nomination, treaty, recommit, quorum, leadership, conviction, veto-override, procedural, unknown. |
result | String | |
resultText | String | |
requires | String | |
relatedBillId | String | FK |
sourceUrl | String | Canonical URL of the upstream source — suitable for linking users to the official primary source. |
sourceUpdatedAt | Datetime | |
createdAt | Datetime | |
updatedAt | Datetime |
Relationships
Belongs to
| Field | Returns | Via |
|---|---|---|
billByRelatedBillId | Bill (nullable) | relatedBillId |
Has many
| Field | Returns | Via |
|---|---|---|
votePositionsByVoteId | VotePositionsConnection | voteId |
Example
{
allVotes(
filter: {
category: { equalTo: "nomination" }
chamber: { equalTo: "s" }
}
orderBy: VOTED_AT_DESC
first: 10
) {
nodes {
voteId
votedAt
question
result
}
}
}