# Applying Filters

Fetching an entire set of accounts data is powerful but filtering is what takes your DevEx to the next level. Most of the time you would be required to fetch a subset of your account data that fulfils a particular condition. Filtering is what enables that.

Imagine fetching only those **V2 proposals**, whose governing mint is **grape token**. Querying Solana like this was not possible at all before this. We will be using the <mark style="color:yellow;">**where**</mark> command for filtering.

{% hint style="info" %}
Use our [GraphQL demo project](https://github.com/Shyft-to/community-projects/tree/main/graphql-demo) to try out these queries in code.
{% endhint %}

<mark style="color:yellow;">**Get all ProposalsV2 where governing mint is Grape token**</mark>

```graphql
query MyQuery {
  GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw_ProposalV2(
    where: {governingTokenMint: {_eq: "8upjSpvjcdpuzhfR1zriwg5NXkwDruejqNE9WNbPRtyA"}}
  ) {
    name
    pubkey
  }
}

```

<mark style="color:yellow;">**Get all ProposalsV2 where name is like Orca**</mark>

```graphql
query MyQuery {
  GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw_ProposalV2(
    where: {name: {_regex: "orca"}}
  ) {
    name
    pubkey
  }
}
```

<mark style="color:yellow;">**Get all ProposalsV2 drafted after 1st Nov 23**</mark>

```graphql
query MyQuery {
  GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw_ProposalV2(
    where: {draftAt: {_gt: "1698796800"}}
  ) {
    name
    pubkey
  }
}
```

These filters enable experiences which otherwise would have taken months to develop before. Right now with Shyft GraphQL API, you can create them in just few API calls.&#x20;

<figure><img src="/files/bMhDl6mcexI5ziytmfXS" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shyft.to/solana-indexers/graphql-apis/applying-filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
