# invalid_select

Source: https://capacms.com/docs/errors/invalid_select

400 invalid_request. The selection cannot be planned, for example a relation modifier where it does not apply.

| HTTP status | `type`            | Surfaces      |
| ----------- | ----------------- | ------------- |
| 400         | `invalid_request` | REST, GraphQL |

## What it means

The selection cannot be planned, for example a relation modifier where it does not apply.

| When                                                                                                                                                                                                                                                                   | What the `hint` tells you                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| unbalanced parentheses, an empty item, a duplicate item, parentheses on something that is not a relation, a modifier on a single relation, a malformed `sort:` inside `select`, or an expansion into a model [this key may not read](https://capacms.com/docs/api/entries#per-model-keys) | the grammar, with a worked example; for a name that holds a space or a character the grammar uses, its [quoted form](https://capacms.com/docs/api/entries#field-names) |

## What to do

Follow the hint; nest at most 4 relations below the root entry (5 levels of entries).

## On GraphQL

`/api/graphql` answers the same `code` inside `errors[].extensions`. The status depends on the `Accept` header you send ([status codes](https://capacms.com/docs/api/graphql#status-codes)):

| `application/json` | `graphql-response+json` | When                                                                                                                                                                                                             |
| ------------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200                | 400                     | REST planner refusals, with `path` set to the root field. `invalid_select` also refuses one relation list read twice in an entry with different arguments (see [Not built yet](https://capacms.com/docs/api/graphql#not-built-yet)) |

## See also

* [Choosing fields](https://capacms.com/docs/api/entries#choosing-fields-select)
