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": "14563bd51174a840ca259630",
"id": "UjS-GKapf",
"configRef": "3db373e52fa27e9544f4e669",
"origin": "example",
"created": 1752270444374,
"orderId": "example",
"updated": 1769679786779,
"expires": 1726835284488,
"status": "example",
"message": "example",
"useSingleAddress": true
}
}
}

Arguments

NameTypeDescription
checkoutIdStringOptional checkout identifier to preserve.

Returns

LogoutResponse