src/content/docs/linter/rules/use-consistent-graphql-descriptions.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.6` - Diagnostic Category: [`lint/nursery/useConsistentGraphqlDescriptions`](/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/description-style`](https://the-guild.dev/graphql/eslint/rules/description-style){
"linter": {
"rules": {
"nursery": {
"useConsistentGraphqlDescriptions": "error"
}
}
}
}
Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema.
blockenum EnumValue {
"this is a description"
DEFAULT
}
enum EnumValue {
"""
this is a description
"""
DEFAULT
}
styleThis option will specify the description style.
"block": Requires triple-quoted block descriptions ("""...""")"inline": Requires single-quoted inline descriptions ("...")Default "block"
{
"linter": {
"rules": {
"nursery": {
"useConsistentGraphqlDescriptions": {
"options": {
"style": "inline"
}
}
}
}
}
}
enum EnumValue {
"""
this is a description
"""
DEFAULT
}