Skip to content

useConsistentGraphqlDescriptions

biome.json
{
"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.

enum EnumValue {
"this is a description"
DEFAULT
}
code-block.graphql:2:3 lint/nursery/useConsistentGraphqlDescriptions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unexpected inline description style.

1 │ enum EnumValue {
> 2 │ “this is a description”
^^^^^^^^^^^^^^^^^^^^^^^
3 │ DEFAULT
4 │ }

To stay consistent within the project, write the description block style.

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.

enum EnumValue {
"""
this is a description
"""
DEFAULT
}

This option will specify the description style.

  • "block": Requires triple-quoted block descriptions ("""...""")
  • "inline": Requires single-quoted inline descriptions ("...")

Default "block"

biome.json
{
"linter": {
"rules": {
"nursery": {
"useConsistentGraphqlDescriptions": {
"options": {
"style": "inline"
}
}
}
}
}
}
enum EnumValue {
"""
this is a description
"""
DEFAULT
}