Customer
A registered customer of the shop — identity, profile, B2B fields, saved addresses and order history. Returned by customer (currently authenticated) and customerSignup.
type Customer implements Node {
addresses(
after: String
before: String
first: Int
last: Int
): MailingAddressConnection!
attributes(
namespace: String
): [EntityAttributeField!]!
companyName: String
createdAt: DateTime!
customerType: CustomerType!
defaultAddress: MailingAddress
displayName: String!
email: String!
emailMarketing: EmailMarketingState!
firstName: String
id: ID!
isEmailVerified: Boolean!
lastName: String
orderCount: UnsignedInt64!
orders(
after: String
first: Int = 10
): OrderConnection!
phone: String
regon: String
sessionExpiresAt: DateTime
tags: [String!]!
taxId: String
totalSpent: Money!
updatedAt: DateTime!
vatNumber: String
}
Fields
Customer.addresses ● MailingAddressConnection! non-null object
Saved address book of the customer (Relay Connection). Use to render an address picker on checkout.
Customer.addresses.after ● String scalar
Cursor for forward pagination (cursor of the last edge from the previous page)
Customer.addresses.before ● String scalar
Cursor for backward pagination (cursor of the first edge from the next page)
Customer.addresses.first ● Int scalar
Number of addresses to return from the start (forward pagination, default 10, max 100)
Customer.addresses.last ● Int scalar
Number of addresses to return from the end (backward pagination, max 100)
Customer.attributes ● [EntityAttributeField!]! non-null object
Customer custom field values (post-Opcja A unified custom fields).
Customer.attributes.namespace ● String scalar
Optional attribute group filter (e.g. loyalty, b2b); omit to return all groups
Customer.companyName ● String scalar
Company name. Populated when customerType is COMPANY; null for INDIVIDUAL profiles.
Customer.createdAt ● DateTime! non-null scalar
When the customer account was created (ISO 8601).
Customer.customerType ● CustomerType! non-null enum
Profile type — INDIVIDUAL (B2C) or COMPANY (B2B). When COMPANY, the company fields below are populated.
Customer.defaultAddress ● MailingAddress object
Default address pre-selected in checkout pickers. Null when the customer has no saved addresses.
Customer.displayName ● String! non-null scalar
Display name — typically firstName lastName, with sensible fallback to email when neither is set. Render directly in the UI.
Customer.email ● String! non-null scalar
Customer email address (login identity).
Customer.emailMarketing ● EmailMarketingState! non-null enum
Marketing consent state (NOT_SUBSCRIBED, PENDING, SUBSCRIBED, UNSUBSCRIBED, REDACTED, INVALID). Drive newsletter UI and opt-in / opt-out controls from this value.
Customer.firstName ● String scalar
Customer first name.
Customer.id ● ID! non-null scalar
Stable identifier of the customer.
Customer.isEmailVerified ● Boolean! non-null scalar
True when the customer has confirmed ownership of their email address.
Customer.lastName ● String scalar
Customer last name.
Customer.orderCount ● UnsignedInt64! non-null scalar
Total number of orders the customer has placed. Stringified for BigInt safety.
Customer.orders ● OrderConnection! non-null object
Orders placed by this customer (Relay Connection). Use for the order history page.
Customer.orders.after ● String scalar
Cursor for forward pagination (cursor of the last edge from the previous page)
Customer.orders.first ● Int scalar
Number of orders to return per page (default 10, max 100)
Customer.phone ● String scalar
Customer phone number (free-form).
Customer.regon ● String scalar
Customer-wide Polish business registry number (REGON, 9 or 14 digits with checksum).
Customer.sessionExpiresAt ● DateTime scalar
Expiry of the access token authenticating the current request (ISO 8601). Present only on the authenticated current customer (the customer query); null otherwise. Schedule a proactive customerRefreshToken before this to keep the session alive.
Customer.tags ● [String!]! non-null scalar
Merchant-assigned segmentation tags (e.g. "vip", "wholesale", "b2b"). Use to customise UI / pricing rules on the storefront.
Customer.taxId ● String scalar
Customer-wide Polish tax ID (NIP, 10 digits with checksum). Default for new addresses; can be overridden per address via MailingAddress.taxId.
Customer.totalSpent ● Money! non-null object
Lifetime amount the customer has spent (sum of paid orders).
Customer.updatedAt ● DateTime! non-null scalar
When the customer profile was last modified (ISO 8601).
Customer.vatNumber ● String scalar
Customer-wide EU VAT number (e.g. PL1234567890). Default for new addresses; can be overridden per address via MailingAddress.vatNumber.
Interfaces
Node interface
GraphQL Node interface — universal ID-based lookup
Returned By
customer query
Member Of
CustomerActivatePayload object ● CustomerResetPasswordPayload object ● CustomerSetDefaultAddressPayload object ● CustomerSignupPayload object ● CustomerUpdatePayload object