Skip to content

createGuestSession

Mutationin Authentication

Create a guest session for anonymous users. Call this before any cart or account operation: no other mutation creates a session, so one that needs a session refuses without it. Idempotent, so calling it with a session already in place is harmless.

Returns

CreateGuestSessionResponse!

FieldTypeDescription
successBoolean!Whether the guest session was created successfully

Example

mutation {
createGuestSession {
success
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccNot resolved