GraphQL
Directives
Directives provide a way to add metadata and modify the behavior of GraphQL operations, fields, and types.
@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 | 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. 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! | 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. |
Locations
FIELD
@include
Directs the executor to include this field or fragment only when the if argument is true.
Arguments
if - 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! | 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! | Skipped when true. |
Locations
FIELD, FRAGMENT_SPREAD, INLINE_FRAGMENT
@specifiedBy
Exposes a URL that specifies the behavior of this scalar.
Arguments
url - 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
| Transaction isolation level. Different isolation levels provide different guarantees about data visibility and consistency. Default: |
Locations
MUTATION, QUERY