export
The @export directive allows you to export a field value as a variable that can be used in subsequent mutations within the same request.
Example:
mutation {
page: goto(url: "https://example.com") {
url @export(as: "currentUrl")
}
text: type(selector: "input", text: "${currentUrl}") {
selector
}
}
directive @export(
as: String!
) on FIELD
Arguments
export.as ● String! non-null scalar
The variable name to export this field value as. Can be referenced in subsequent mutations using ${variableName} template syntax.