Represents a browser cookie.

Definition

object Cookie {
  name: String!
  value: String!
  domain: String!
  path: String
  expires: Int!
  httpOnly: Boolean!
  secure: Boolean!
  sameSite: SameSite!
}

Fields

name: String!

The name of the cookie. Example: "session_id".

value: String!

The value of the cookie. Example: "abc123xyz789".

domain: String!

The domain for which the cookie is valid. Example: ".example.com".

path: String

The path for which the cookie is valid. Example: "/" or "/app".

expires: Int!

Expiration date as a Unix timestamp in seconds. If -1, it’s a session cookie.

httpOnly: Boolean!

Indicates if the cookie is HTTP-only (not accessible via client-side JavaScript).

secure: Boolean!

Indicates if the cookie should only be sent over secure (HTTPS) connections.

sameSite: SameSite!

The SameSite attribute of the cookie (e.g., STRICT, LAX, NONE). See SameSite enum.