> ## Documentation Index
> Fetch the complete documentation index at: https://cosmos-docs-cosmjs-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Governance Queries

> Query proposals, votes, deposits, tallies, and governance parameters

The governance extension queries proposals, votes, deposits, and tallies.

```typescript theme={"system"}
import { QueryClient, setupGovExtension } from "@cosmjs/stargate";
import { ProposalStatus } from "cosmjs-types/cosmos/gov/v1beta1/gov";
import { connectComet } from "@cosmjs/tendermint-rpc";

const cometClient = await connectComet("https://rpc.my-chain.network");
const queryClient = QueryClient.withExtensions(cometClient, setupGovExtension);
```

## Proposals

```typescript theme={"system"}
const allProposals = await queryClient.gov.proposals(
  ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED,
  "",
  "",
);
console.info(allProposals.proposals);

const votingProposals = await queryClient.gov.proposals(
  ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD,
  "",
  "",
);

const proposal = await queryClient.gov.proposal(1);
console.info(proposal.proposal);
```

## Votes and Deposits

```typescript theme={"system"}
const votes = await queryClient.gov.votes(1);
console.info(votes.votes);

const vote = await queryClient.gov.vote(1, "cosmos1...");
console.info(vote.vote);

const deposits = await queryClient.gov.deposits(1);
console.info(deposits.deposits);

const deposit = await queryClient.gov.deposit(1, "cosmos1...");
```

## Tally and Params

```typescript theme={"system"}
const tally = await queryClient.gov.tally(1);
console.info(tally.tally);

const votingParams = await queryClient.gov.params("voting");
const depositParams = await queryClient.gov.params("deposit");
const tallyParams = await queryClient.gov.params("tallying");
```

## Available Methods

| Method      | Parameters                                         | Paginated |
| ----------- | -------------------------------------------------- | --------- |
| `proposals` | `proposalStatus, depositor, voter, paginationKey?` | Yes       |
| `proposal`  | `proposalId`                                       | No        |
| `votes`     | `proposalId, paginationKey?`                       | Yes       |
| `vote`      | `proposalId, voterAddress`                         | No        |
| `deposits`  | `proposalId, paginationKey?`                       | Yes       |
| `deposit`   | `proposalId, depositorAddress`                     | No        |
| `tally`     | `proposalId`                                       | No        |
| `params`    | `parametersType`                                   | No        |

## Next Steps

<CardGroup cols={2}>
  <Card title="Staking Queries" icon="coins" href="/cosmjs/v0.38.x/guides/query/staking">
    Validators and delegations.
  </Card>

  <Card title="Pagination" icon="forward" href="/cosmjs/v0.38.x/guides/query/pagination">
    Navigate paginated result sets.
  </Card>
</CardGroup>
