# Directives

Directives provide a way to add metadata and modify the behavior of GraphQL operations, fields, and types.

Source: https://www.twisp.com/docs/reference/graphql/directives

## @cel
Denotes that the variable definition is resolved via a CEL Expression.

The default value provided to the string is the CEL expression.
And the cel value must resolve/convert to the graphql type indicated by the variable.

@example(`$someVariable: String = "string('hello world')" @cel`)
#### Locations
``VARIABLE_DEFINITION``
## @deprecated
Marks an element of a GraphQL schema as no longer supported.
#### Arguments

---
* ``reason`` - [`String`](/docs/reference/graphql/types/scalar#string)
* Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/). _Default:_ ``"No longer supported"``

#### Locations
``FIELD_DEFINITION``, ``ARGUMENT_DEFINITION``, ``INPUT_FIELD_DEFINITION``, ``ENUM_VALUE``
## @dryRun
Allows to dryRun a mutation without committing the data.
#### Locations
``MUTATION``
## @export
#### Arguments

---
* ``as`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
---
* ``cel`` - [`Expression`](/docs/reference/graphql/types/scalar#expression)
* A literal CEL expression to be evaluated.

#### Locations
``FIELD``
## @include
Directs the executor to include this field or fragment only when the `if` argument is true.
#### Arguments

---
* ``if`` - [`Boolean!`](/docs/reference/graphql/types/scalar#boolean)
* Included when true.

#### Locations
``FIELD``, ``FRAGMENT_SPREAD``, ``INLINE_FRAGMENT``
## @retry
Twisp will retry retriable errors for up to duration automatically.

Uses a golang duration string. If the value is less than or equal to zero, no retries performed.

@example(`@retry(for:"30s")`)
#### Arguments

---
* ``for`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. _Default:_ ``"30s"``

#### Locations
``MUTATION``, ``QUERY``
## @skip
Directs the executor to skip this field or fragment when the `if` argument is true.
#### Arguments

---
* ``if`` - [`Boolean!`](/docs/reference/graphql/types/scalar#boolean)
* Skipped when true.

#### Locations
``FIELD``, ``FRAGMENT_SPREAD``, ``INLINE_FRAGMENT``
## @specifiedBy
Exposes a URL that specifies the behavior of this scalar.
#### Arguments

---
* ``url`` - [`String!`](/docs/reference/graphql/types/scalar#string)
* The URL that specifies the behavior of this scalar.

#### Locations
``SCALAR``
## @tx
Sets the transaction isolation level for the operation.

@example(`@tx(isolation: SERIALIZABLE)`)
#### Arguments

---
* ``isolation`` - [`TxIsolation`](/docs/reference/graphql/types/enum#tx-isolation)
* Transaction isolation level.

  Different isolation levels provide different guarantees about data visibility and consistency. _Default:_ ``SNAPSHOT``

#### Locations
``MUTATION``, ``QUERY``