Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

User Object

Represents user data.

type User implements Node & ObjectWithMetadata & ObjectWithAttributes {
  id: ID!
  privateMetadata: [MetadataItem!]!
  privateMetafield(key: String!): String
  privateMetafields(keys: [String!]): Metadata
  metadata: [MetadataItem!]!
  metafield(key: String!): String
  metafields(keys: [String!]): Metadata
  assignedAttribute(slug: String!): AssignedAttribute
  assignedAttributes(limit: PositiveInt = 100): [AssignedAttribute!]!
  email: String!
  firstName: String!
  lastName: String!
  isStaff: Boolean!
  isActive: Boolean!
  isConfirmed: Boolean!
  addresses: [Address!]!
  checkout: Checkout @deprecated(reason: "Use the `checkoutTokens` field to fetch the user checkouts.")
  checkoutTokens(channel: String): [UUID!] @deprecated(reason: "Use `checkoutIds` instead.")
  checkoutIds(channel: String): [ID!]
  checkouts(channel: String, before: String, after: String, first: Int, last: Int): CheckoutCountableConnection
  giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection
  note: String
  orders(where: CustomerOrderWhereInput, before: String, after: String, first: Int, last: Int): OrderCountableConnection
  userPermissions: [UserPermission!]
  permissionGroups: [Group!]
  editableGroups: [Group!]
  accessibleChannels: [Channel!]
  restrictedAccessToChannels: Boolean!
  avatar(size: Int, sizeRounding: ThumbnailSizeRoundingEnum = NEAREST, format: ThumbnailFormatEnum = ORIGINAL): Image
  events: [CustomerEvent!]
  storedPaymentSources(channel: String): [PaymentSource!] @deprecated(reason: "The legacy Payments API is deprecated and will be removed. Use the Transactions API instead.")
  languageCode: LanguageCodeEnum!
  defaultShippingAddress: Address
  defaultBillingAddress: Address
  externalReference: String
  customerType: CustomerType
  lastLogin: DateTime
  dateJoined: DateTime!
  updatedAt: DateTime!
  storedPaymentMethods(channel: String!): [StoredPaymentMethod!]
}

Interfaces

Node, ObjectWithMetadata, ObjectWithAttributes

Fields

id

id · ID!

The ID of the user.

privateMetadata

privateMetadata · [MetadataItem!]!

List of private metadata items. Requires staff permissions to access.

privateMetafield

privateMetafield · String

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

key

key · String!

privateMetafields

privateMetafields · Metadata

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

keys

keys · [String!]

metadata

metadata · [MetadataItem!]!

List of public metadata items. Can be accessed without permissions.

metafield

metafield · String

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

key

key · String!

metafields

metafields · Metadata

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

keys

keys · [String!]

assignedAttribute

assignedAttribute · AssignedAttribute

Get a single attribute assigned to the user by attribute slug. The attribute is looked up among the attributes of the user’s customer type.

Requires one of the following permissions:MANAGE_USERSOWNER

The owner can access only attributes that are visible in the storefront.

Added in Saleor 3.23

slug

slug · String!

Slug of the attribute

assignedAttributes

assignedAttributes · [AssignedAttribute!]!

List of attributes assigned to the user through the user’s customer type.

Requires one of the following permissions:MANAGE_USERSOWNER

The owner can access only attributes that are visible in the storefront.

Added in Saleor 3.23

limit

limit · PositiveInt

Maximum number of attributes to return. Default is 100.

Default: 100.

email

email · String!

The email address of the user.

firstName

firstName · String!

The given name of the address.

lastName

lastName · String!

The family name of the address.

isStaff

isStaff · Boolean!

Determine if the user is a staff admin.

isActive

isActive · Boolean!

Determine if the user is active.

isConfirmed

isConfirmed · Boolean!

Determines if user has confirmed email.

addresses

addresses · [Address!]!

List of all user’s addresses.

checkout

checkout · Checkout

Returns the last open checkout of this user.

checkoutTokens

checkoutTokens · [UUID!]

Returns the checkout UUID’s assigned to this user.

channel

channel · String

Slug of a channel for which the data should be returned.

checkoutIds

checkoutIds · [ID!]

Returns the checkout ID’s assigned to this user.

channel

channel · String

Slug of a channel for which the data should be returned.

checkouts

checkouts · CheckoutCountableConnection

Returns checkouts assigned to this user. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations.

channel

channel · String

Slug of a channel for which the data should be returned.

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

giftCards

giftCards · GiftCardCountableConnection

List of the user gift cards.

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

note

note · String

A note about the customer.

Requires one of the following permissions:MANAGE_USERSMANAGE_STAFF

orders

orders · OrderCountableConnection

List of user’s orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations.

Requires one of the following permissions:MANAGE_STAFFOWNER

where

where · CustomerOrderWhereInput

Where filtering options for orders.

Added in Saleor 3.22

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

userPermissions

userPermissions · [UserPermission!]

List of user’s permissions.

permissionGroups

permissionGroups · [Group!]

List of user’s permission groups.

editableGroups

editableGroups · [Group!]

List of user’s permission groups which user can manage.

accessibleChannels

accessibleChannels · [Channel!]

List of channels the user has access to. The sum of channels from all user groups. If at least one group has restrictedAccessToChannels set to False - all channels are returned.

restrictedAccessToChannels

restrictedAccessToChannels · Boolean!

Determine if user have restricted access to channels. False if at least one user group has restrictedAccessToChannels set to False.

avatar

avatar · Image

The avatar of the user.

size

size · Int

Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). Thumbnails are generated only in the available sizes: 32, 64, 128, 256, 512, 1024, 2048, 4096; sizeRounding determines which one is used.

sizeRounding

sizeRounding · ThumbnailSizeRoundingEnum

Determines how the requested size is matched to an available thumbnail size.

Added in Saleor 3.23

Default: NEAREST.

format

format · ThumbnailFormatEnum

The format of the image. When not provided, format of the original image will be used.

Default: ORIGINAL.

events

events · [CustomerEvent!]

List of events associated with the user.

Requires one of the following permissions:MANAGE_USERSMANAGE_STAFF

storedPaymentSources

storedPaymentSources · [PaymentSource!]

List of stored payment sources. The field returns a list of payment sources stored for payment plugins.

channel

channel · String

Slug of a channel for which the data should be returned.

languageCode

languageCode · LanguageCodeEnum!

User language code.

defaultShippingAddress

defaultShippingAddress · Address

The default shipping address of the user.

defaultBillingAddress

defaultBillingAddress · Address

The default billing address of the user.

externalReference

externalReference · String

External ID of this user.

customerType

customerType · CustomerType

The customer type assigned to the user.

Requires one of the following permissions:MANAGE_USERSOWNER
Added in Saleor 3.23

lastLogin

lastLogin · DateTime

The date when the user last time log in to the system.

dateJoined

dateJoined · DateTime!

The data when the user create account.

updatedAt

updatedAt · DateTime!

The data when the user last update the account information.

storedPaymentMethods

storedPaymentMethods · [StoredPaymentMethod!]

Returns a list of user’s stored payment methods that can be used in provided channel. The field returns a list of stored payment methods by payment apps. When amount is not provided, 0 will be used as default value.

channel

channel · String!

Slug of a channel for which the data should be returned.

Used by


Schema: Saleor 3.23.43. Download SDL.

Last updated on August 10, 2026

Was this page helpful?