# GraphQL

LLMS index: [llms.txt](/llms.txt)

---

## GraphQL Attributes

This document defines attributes for GraphQL.

**Attributes:**

| Key | Stability | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- |
| <a id="graphql-document" href="#graphql-document">`graphql.document`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The GraphQL document being executed. [1] | `query findBookById { bookById(id: ?) { name } }` |
| <a id="graphql-operation-name" href="#graphql-operation-name">`graphql.operation.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The name of the operation being executed. | `findBookById` |
| <a id="graphql-operation-type" href="#graphql-operation-type">`graphql.operation.type`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The type of the operation being executed. | `query`; `mutation`; `subscription` |

**[1] `graphql.document`:** The value may be sanitized to exclude sensitive information.

---

`graphql.operation.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
| --- | --- | --- |
| `mutation` | GraphQL mutation | ![Development](https://img.shields.io/badge/-development-blue) |
| `query` | GraphQL query | ![Development](https://img.shields.io/badge/-development-blue) |
| `subscription` | GraphQL subscription | ![Development](https://img.shields.io/badge/-development-blue) |
