LegislatorTerm
Each row is one term of service. A legislator may have many terms across both chambers.
GraphQL type: LegislatorTerm · Connection: LegislatorTermsConnection
Queries
| Query | Returns | Description |
|---|---|---|
allLegislatorTerms(filter, orderBy, first, last, before, after) | LegislatorTermsConnection | Paginated list with filtering and ordering |
legislatorTermById(id: BigInt!) | LegislatorTerm | Look up by primary key |
Fields
| Field | GraphQL Type | Notes |
|---|---|---|
id | BigInt | PK |
bioguideId | String | required FK |
termType | String | required. One of: rep, sen |
startDate | Date | required |
endDate | Date | required |
state | String | required |
party | String | |
caucus | String | |
district | Int | House only. 0 = at-large district. -1 = unknown in historical data. |
senateClass | Int | One of: 1, 2, 3 |
stateRank | String | One of: junior, senior |
how | String | |
url | String | |
address | String | |
phone | String | |
office | String |
Relationships
Belongs to
| Field | Returns | Via |
|---|---|---|
legislatorByBioguideId | Legislator | bioguideId |
Example
{
allLegislatorTerms(
filter: { state: { equalTo: "TX" }, termType: { equalTo: "sen" } }
orderBy: START_DATE_DESC
first: 10
) {
nodes {
startDate
endDate
party
state
legislatorByBioguideId {
officialFull
}
}
}
}