# issues query


`issues` is a GraphQL query of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Returns a page of issues that match a filter, newest first by `effectiveAt`, then by when they
were created, then by id. Use it to read an issue back after the events feed reports that one
was opened, completed, cancelled or revised.

- Requires the `issue.read` permission.
- Draft issues are never returned.
- Issues outside your API key's warehouse or legal-entity scope are left out.
- The connection has no total count.
- `filter.ids` names at most 50 issues. An id that does not exist, is not an issue, is a draft
  or is outside your API key's scope is left out of the page. It is never an error.

Pass exactly one of `first` or `last`, from 1 to 250. `first` (with `after`) pages forward;
`last` (with `before`) pages backward. `last` alone returns the last page. Every edge carries
its own cursor.

A page costs 2 + first (or last) × the cost of one node.

## Arguments

- `filter`: [`IssueFilter`](/chameleoon-max/type/issue-filter)
- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

## Returns

[`IssueConnection!`](/chameleoon-max/type/issue-connection): a page of [`Issue`](/chameleoon-max/type/issue).

## Example

**Query**

```graphql
query issues($first: Int) {
  issues(first: $first) {
    edges {
      cursor
    }
    nodes {
      stockVersion
      id
      number
      status
      version
      effectiveAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

**Variables**

```json
{
  "first": 10
}
```

**Response**

```json
{
  "data": {
    "issues": {
      "edges": [
        {
          "cursor": "example"
        }
      ],
      "nodes": [
        {
          "stockVersion": "example",
          "id": "00000000-0000-4000-8000-000000000001",
          "number": "example",
          "status": "OPEN",
          "version": 1,
          "effectiveAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "example",
        "endCursor": "example"
      }
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
