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

# creditGrants

> Get all credit grants for an environment



**query** `creditGrants(input: GetCreditGrantsInput!): CreditGrantConnection!`

## Arguments

**`input`**: `GetCreditGrantsInput!` (required)

## Returns

`CreditGrantConnection!`

**`edges`**: `[CreditGrantEdge!]!`

Edges in the current page

---

**`pageInfo`**: `PageInfo!`

Pagination information

---

**`totalCount`**: `Int!`

Total number of items matching the filter

## Examples

```graphql Query
query CreditGrants($input: GetCreditGrantsInput!) {
  creditGrants(input: $input) {
    edges {
      cursor
      node {
        additionalMetaData
        amount
        automaticRechargeConfigurationId
        comment
        consumedAmount
        cost {
          __typename
        }
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

```json Variables
{
  "input": {
    "customerId": "string"
  }
}
```

```json Response
{
  "data": {
    "creditGrants": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "additionalMetaData": "value",
            "amount": 1.5,
            "automaticRechargeConfigurationId": "value",
            "comment": "string",
            "consumedAmount": 1.5,
            "cost": {
              "__typename": "Money"
            }
          }
        }
      ],
      "pageInfo": {
        "endCursor": "value",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "value"
      },
      "totalCount": 1
    }
  }
}
```


## Related topics

- [CreditGrant](https://docs.stigg.io/graphql-reference/types/CreditGrant.md)
- [Credit grants table](https://docs.stigg.io/documentation/snap-in-widgets/credit-grants.md)
- [Void credit grant](https://docs.stigg.io/api-reference/credit-grants/void-credit-grant.md)
- [Create a credit grant](https://docs.stigg.io/api-reference/credit-grants/create-a-credit-grant.md)
- [Get a list of credit grants](https://docs.stigg.io/api-reference/credit-grants/get-a-list-of-credit-grants.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.