# noRootType

Rule `biome/noRootType`. Disallow configured GraphQL root operation types.

- Source: biome
- Technologies: GraphQL
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 2.1M weekly downloads of presets that enable it
- Trend: +151.7% last quarter
- Rank: #1545 by reach, #49 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/noRootType` | no | no | group style, since 2.3.12 | [docs](https://biomejs.dev/linter/rules/no-root-type/) |

## Code examples

### Incorrect: the rule reports this

```graphql
type Mutation {
  createUser(input: CreateUserInput!): User!
}
```

### Correct: the rule accepts this

```graphql
type Query {
  users: [User!]!
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "noRootType": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noRedundantDefaultExport](https://lintradar.dev/rules/biome/noRedundantDefaultExport.md): Checks if a default export exports the same symbol as a named export.
- [biome/noShoutyConstants](https://lintradar.dev/rules/biome/noShoutyConstants.md): Disallow constants whose string value is the same as their uppercase name.
- [biome/noExportedImports](https://lintradar.dev/rules/biome/noExportedImports.md): Disallow exporting an imported variable.
- [biome/noTopLevelLiterals](https://lintradar.dev/rules/biome/noTopLevelLiterals.md): Require the JSON top-level value to be an array or object.
- [biome/noEvolvingTypes](https://lintradar.dev/rules/biome/noEvolvingTypes.md): Disallow variables from evolving into `any` type through reassignments.
- [biome/noUnusedTemplateLiteral](https://lintradar.dev/rules/biome/noUnusedTemplateLiteral.md): Disallow template literals if interpolation and special-character handling are not needed

---

Web page: https://lintradar.dev/rules/biome/noRootType. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
