---
# Don't modify this file manually. This file is auto generated from source, and you will lose your changes next time the website is built.
# Head to the `biomejs/biome` repository, and modify the source code in there.

title: useConsistentGraphqlDescriptions
description: Learn more about useConsistentGraphqlDescriptions
---
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)

## How to configure
```json title="biome.json"
{
	"linter": {
		"rules": {
			"nursery": {
				"useConsistentGraphqlDescriptions": "error"
			}
		}
	}
}

```
## Description
Require all descriptions to follow the same style (either block or inline) to  maintain consistency and improve readability across the schema.

## Examples

### style: `block`

#### Invalid

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

<pre class="language-text"><code class="language-text">code-block.graphql:2:3 <a href="https://biomejs.dev/linter/rules/use-consistent-graphql-descriptions">lint/nursery/useConsistentGraphqlDescriptions</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br /><br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Unexpected inline description style.</span><br />  <br />    <strong>1 │ </strong>enum EnumValue &#123;<br />  <strong><span style="color: Tomato;">&gt;</span></strong> <strong>2 │ </strong>  &quot;this is a description&quot;<br />   <strong>   │ </strong>  <strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><br />    <strong>3 │ </strong>  DEFAULT<br />    <strong>4 │ </strong>&#125;<br />  <br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">To stay consistent within the project, write the description block style.</span><br />  <br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit </span><span style="color: lightgreen;"><a href="https://biomejs.dev/linter/#nursery">https://biomejs.dev/linter/#nursery</a></span><span style="color: lightgreen;"> for more information.</span><br />  <br /></code></pre>

#### Valid

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

## Options

### `style`

This option will specify the description style.

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

Default `"block"`

```json title='biome.json'
{
	"linter": {
		"rules": {
			"nursery": {
				"useConsistentGraphqlDescriptions": {
					"options": {
						"style": "inline"
					}
				}
			}
		}
	}
}

```

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

<pre class="language-text"><code class="language-text"></code></pre>

## Related links

- [Disable a rule](/linter/#disable-a-rule)
- [Configure the code fix](/linter#configure-the-code-fix)
- [Rule options](/linter/#rule-options)
- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/src/lint/nursery/use_consistent_graphql_descriptions.rs)
- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/nursery/useConsistentGraphqlDescriptions)

</TabItem>
</Tabs>