Skip to content

useUniqueFieldDefinitionNames

biome.json
{
"linter": {
"rules": {
"nursery": {
"useUniqueFieldDefinitionNames": "error"
}
}
}
}

Require all fields of a type to be unique.

A GraphQL complex type is only valid if all its fields are uniquely named.

type SomeObject {
foo: String
foo: String
}
code-block.graphql:1:1 lint/nursery/useUniqueFieldDefinitionNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate field name.

> 1 │ type SomeObject {
^^^^^^^^^^^^^^^^^
> 2 │ foo: String
> 3 │ foo: String
> 4 │ }
^
5 │

A GraphQL complex type is only valid if all its fields are uniquely named. Make sure to name every field differently.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

interface SomeObject {
foo: String
foo: String
}
code-block.graphql:1:1 lint/nursery/useUniqueFieldDefinitionNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate field name.

> 1 │ interface SomeObject {
^^^^^^^^^^^^^^^^^^^^^^
> 2 │ foo: String
> 3 │ foo: String
> 4 │ }
^
5 │

A GraphQL complex type is only valid if all its fields are uniquely named. Make sure to name every field differently.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

input SomeObject {
foo: String
foo: String
}
code-block.graphql:1:1 lint/nursery/useUniqueFieldDefinitionNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate field name.

> 1 │ input SomeObject {
^^^^^^^^^^^^^^^^^^
> 2 │ foo: String
> 3 │ foo: String
> 4 │ }
^
5 │

A GraphQL complex type is only valid if all its fields are uniquely named. Make sure to name every field differently.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

type SomeObject {
foo: String
bar: String
}
interface SomeObject {
foo: String
bar: String
}
input SomeObject {
foo: String
bar: String
}