# noDuplicateFieldDefinitionNames

Rule `biome/noDuplicateFieldDefinitionNames`. Require all fields of a type to be unique.

- Source: biome
- Technologies: GraphQL
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #507 by reach, #142 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/noDuplicateFieldDefinitionNames` | yes | no | group correctness, since 2.3.11 | [docs](https://biomejs.dev/linter/rules/no-duplicate-field-definition-names/) |

## Code examples

### Incorrect: the rule reports this

```graphql
type SomeObject {
  foo: String
  foo: String
}
```

```graphql
interface SomeObject {
  foo: String
  foo: String
}
```

```graphql
input SomeObject {
  foo: String
  foo: String
}
```

### Correct: the rule accepts this

```graphql
type SomeObject {
  foo: String
  bar: String
}
```

```graphql
interface SomeObject {
  foo: String
  bar: String
}
```

```graphql
input SomeObject {
  foo: String
  bar: String
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noDuplicateFieldDefinitionNames": "error"
      }
    }
  }
}
```

## Presets that enable it

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

## Related rules

- [biome/noDuplicateEnumValueNames](https://lintradar.dev/rules/biome/noDuplicateEnumValueNames.md): Disallow duplicate names in GraphQL enums.
- [biome/noDuplicateFields](https://lintradar.dev/rules/biome/noDuplicateFields.md): Disallow duplicate names inside GraphQL operations.
- [biome/noDuplicateCustomProperties](https://lintradar.dev/rules/biome/noDuplicateCustomProperties.md): Disallow duplicate custom properties within declaration blocks.
- [biome/noDuplicateFontNames](https://lintradar.dev/rules/biome/noDuplicateFontNames.md): Disallow duplicate names in font-family lists.
- [biome/noDuplicateAtImportRules](https://lintradar.dev/rules/biome/noDuplicateAtImportRules.md): Disallow duplicate `@import` rules.
- [biome/noDuplicateInputFieldNames](https://lintradar.dev/rules/biome/noDuplicateInputFieldNames.md): Require fields within an input object to be unique.

---

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