Skip to main content

logout Mutation

Description​

Logs out the current user session.

mutation logout($checkoutId: String) {
logout(checkoutId: $checkoutId) {
ok
checkout {
_id
id
configRef
origin
created
orderId
updated
expires
status
message
useSingleAddress
}
}
}

Variables​

{
"checkoutId": "checkoutId"
}

Response​

{
"logout": {
"ok": true,
"checkout": {
"_id": "b5547aceed9ce7d3f639983f",
"id": "6Fp-0svWc",
"configRef": "b8b5a50a2c5d15d4dabcb3f5",
"origin": "example",
"created": 1736967251807,
"orderId": "example",
"updated": 1730064029342,
"expires": 1762814251587,
"status": "example",
"message": "example",
"useSingleAddress": true
}
}
}

Arguments​

NameTypeDescription
checkoutIdStringOptional checkout identifier to preserve.

Returns​

LogoutResponse