---
# 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: useGraphqlNamingConvention
description: Learn more about useGraphqlNamingConvention
---
import { Tabs, TabItem } from '@astrojs/starlight/components';

<Tabs>
<TabItem label="GraphQL" icon="seti:graphql">
## Summary
- Rule available since: `v2.0.0`
- Diagnostic Category: [`lint/style/useGraphqlNamingConvention`](/reference/diagnostics#diagnostic-category)
- This rule isn't recommended, so you need to enable it.
- This rule doesn't have a fix.
- The default severity of this rule is [**information**](/reference/diagnostics#information).
- Sources: 
  - Inspired from [`enum-values-all-caps`](https://github.com/cjoudrey/graphql-schema-linter?tab=readme-ov-file#enum-values-all-caps)

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

```
## Description
Validates that all enum values are capitalized.

By convention in GraphQL, enum values are all caps.

## Examples

### Invalid

```graphql
enum MyEnum {
 value
}
```

<pre class="language-text"><code class="language-text">code-block.graphql:2:2 <a href="https://biomejs.dev/linter/rules/use-graphql-naming-convention">lint/style/useGraphqlNamingConvention</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br /><br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Enum values should be in all caps.</span><br />  <br />    <strong>1 │ </strong>enum MyEnum &#123;<br />  <strong><span style="color: Tomato;">&gt;</span></strong> <strong>2 │ </strong> value<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><br />    <strong>3 │ </strong>&#125;<br />    <strong>4 │ </strong><br />  <br />  <strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Change the enum value to be in all caps.</span><br />  <br /></code></pre>

### Valid

```graphql
enum MyEnum {
 VALUE
}
```

## 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/style/use_graphql_naming_convention.rs)
- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/style/useGraphqlNamingConvention)

</TabItem>
</Tabs>