src/content/docs/linter/rules/no-duplicate-argument-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/noDuplicateArgumentNames`](/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-argument-names`](https://the-guild.dev/graphql/eslint/rules/unique-argument-names){
"linter": {
"rules": {
"nursery": {
"noDuplicateArgumentNames": "error"
}
}
}
}
Require all argument names for fields & directives to be unique.
A GraphQL field or directive is only valid if all supplied arguments are uniquely named.
query {
field(arg1: "value", arg1: "value")
}
query {
field(arg1: "value", arg2: "value")
}