src/content/docs/linter/rules/no-duplicate-input-field-names.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="GraphQL" icon="seti:graphql"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.11` - Diagnostic Category: [`lint/nursery/noDuplicateInputFieldNames`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`@graphql-eslint/unique-input-field-names`](https://the-guild.dev/graphql/eslint/rules/unique-input-field-names){
"linter": {
"rules": {
"nursery": {
"noDuplicateInputFieldNames": "error"
}
}
}
}
Require fields within an input object to be unique.
A GraphQL input object value is only valid if all supplied fields are uniquely named.
query {
field(arg: { f1: "value", f1: "value" })
}
query {
field(arg: { f1: "value", f2: "value" })
}