> ## 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.

# environments



**query** `environments(filter: EnvironmentFilter, paging: CursorPaging, sorting: [EnvironmentSort!]): EnvironmentConnection!`

## Arguments

**`filter`**: `EnvironmentFilter` = {}

Specify to filter the records returned.

---

**`paging`**: `CursorPaging` = {first: 10}

Limit or page results.

---

**`sorting`**: `[EnvironmentSort!]` = [{direction: DESC, field: createdAt}]

Specify to sort results.

## Returns

`EnvironmentConnection!`

**`edges`**: `[EnvironmentEdge!]!`

Array of edges.

---

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

Paging information

## Examples

```graphql Query
query Environments {
  environments {
    edges {
      cursor
      node {
        account {
          __typename
        }
        apiKeys {
          __typename
        }
        color
        createdAt
        description
        displayName
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}
```

```json Response
{
  "data": {
    "environments": {
      "edges": [
        {
          "cursor": "value",
          "node": {
            "account": {
              "__typename": "Account"
            },
            "apiKeys": [
              {
                "__typename": "ApiKey"
              }
            ],
            "color": "string",
            "createdAt": "value",
            "description": "string",
            "displayName": "string"
          }
        }
      ],
      "pageInfo": {
        "endCursor": "value",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "value"
      }
    }
  }
}
```


## Related topics

- [Environments](https://docs.stigg.io/documentation/managing-your-account/environments/index.md)
- [Environment](https://docs.stigg.io/graphql-reference/types/Environment.md)
- [EnvironmentInput](https://docs.stigg.io/graphql-reference/types/EnvironmentInput.md)
- [EnvironmentType](https://docs.stigg.io/graphql-reference/types/EnvironmentType.md)
- [mergeEnvironment](https://docs.stigg.io/graphql-reference/mutations/mergeEnvironment.md)


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