User Object
Represents user data.
type User implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(
key: String!
): String
privateMetafields(
keys: [String!]
): Metadata
metadata: [MetadataItem!]!
metafield(
key: String!
): String
metafields(
keys: [String!]
): Metadata
email: String!
firstName: String!
lastName: String!
isStaff: Boolean!
isActive: Boolean!
isConfirmed: Boolean!
addresses: [Address!]!
checkout: Checkout @deprecated
checkoutTokens(
channel: String
): [UUID!] @deprecated
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(
before: String
after: String
first: Int
last: Int
): OrderCountableConnection
userPermissions: [UserPermission!]
permissionGroups: [Group!]
editableGroups: [Group!]
accessibleChannels: [Channel!]
restrictedAccessToChannels: Boolean!
avatar(
size: Int
format: ThumbnailFormatEnum = ORIGINAL
): Image
events: [CustomerEvent!]
storedPaymentSources(
channel: String
): [PaymentSource!]
languageCode: LanguageCodeEnum!
defaultShippingAddress: Address
defaultBillingAddress: Address
externalReference: String
lastLogin: DateTime
dateJoined: DateTime!
updatedAt: DateTime!
storedPaymentMethods(
channel: String!
): [StoredPaymentMethod!]
}
Fields
User.id ● ID! non-null scalar miscellaneous
The ID of the user.
User.privateMetadata ● [MetadataItem!]! non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
User.privateMetafield ● String scalar miscellaneous
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
User.privateMetafield.key ● String! non-null scalar miscellaneous
User.privateMetafields ● Metadata scalar miscellaneous
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
User.privateMetafields.keys ● [String!] list scalar miscellaneous
User.metadata ● [MetadataItem!]! non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
User.metafield ● String scalar miscellaneous
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
User.metafield.key ● String! non-null scalar miscellaneous
User.metafields ● Metadata scalar miscellaneous
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
User.metafields.keys ● [String!] list scalar miscellaneous
User.email ● String! non-null scalar miscellaneous
The email address of the user.
User.firstName ● String! non-null scalar miscellaneous
The given name of the address.
User.lastName ● String! non-null scalar miscellaneous
The family name of the address.
User.isStaff ● Boolean! non-null scalar miscellaneous
Determine if the user is a staff admin.
User.isActive ● Boolean! non-null scalar miscellaneous
Determine if the user is active.
User.isConfirmed ● Boolean! non-null scalar miscellaneous
Determines if user has confirmed email.
User.addresses ● [Address!]! non-null object users
List of all user's addresses.
User.checkout ● Checkout deprecated object checkout
This field will be removed in Saleor 4.0. Use the checkoutTokens field to fetch the user checkouts.
Returns the last open checkout of this user.
User.checkoutTokens ● [UUID!] deprecated list scalar miscellaneous
This field will be removed in Saleor 4.0. Use checkoutIds instead.
Returns the checkout UUID's assigned to this user.
User.checkoutTokens.channel ● String scalar miscellaneous
Slug of a channel for which the data should be returned.
User.checkoutIds ● [ID!] list scalar miscellaneous
Returns the checkout ID's assigned to this user.
User.checkoutIds.channel ● String scalar miscellaneous
Slug of a channel for which the data should be returned.
User.checkouts ● CheckoutCountableConnection object checkout
Returns checkouts assigned to this user.
User.checkouts.channel ● String scalar miscellaneous
Slug of a channel for which the data should be returned.
User.checkouts.before ● String scalar miscellaneous
Return the elements in the list that come before the specified cursor.
User.checkouts.after ● String scalar miscellaneous
Return the elements in the list that come after the specified cursor.
User.checkouts.first ● Int scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.checkouts.last ● Int scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.giftCards ● GiftCardCountableConnection object gift-cards
List of the user gift cards.
User.giftCards.before ● String scalar miscellaneous
Return the elements in the list that come before the specified cursor.
User.giftCards.after ● String scalar miscellaneous
Return the elements in the list that come after the specified cursor.
User.giftCards.first ● Int scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.giftCards.last ● Int scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.note ● String scalar miscellaneous
A note about the customer.
User.orders ● OrderCountableConnection object orders
List of user's orders.
User.orders.before ● String scalar miscellaneous
Return the elements in the list that come before the specified cursor.
User.orders.after ● String scalar miscellaneous
Return the elements in the list that come after the specified cursor.
User.orders.first ● Int scalar miscellaneous
Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.orders.last ● Int scalar miscellaneous
Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.
User.userPermissions ● [UserPermission!] list object users
List of user's permissions.
User.permissionGroups ● [Group!] list object users
List of user's permission groups.
User.editableGroups ● [Group!] list object users
List of user's permission groups which user can manage.
User.accessibleChannels ● [Channel!] list object channels
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.
User.restrictedAccessToChannels ● Boolean! non-null scalar miscellaneous
Determine if user have restricted access to channels. False if at least one user group has restrictedAccessToChannels set to False.
User.avatar ● Image object miscellaneous
The avatar of the user.
User.avatar.size ● Int scalar miscellaneous
Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).
User.avatar.format ● ThumbnailFormatEnum enum miscellaneous
The format of the image. When not provided, format of the original image will be used.
User.events ● [CustomerEvent!] list object users
List of events associated with the user.
User.storedPaymentSources ● [PaymentSource!] list object payments
List of stored payment sources. The field returns a list of payment sources stored for payment plugins.
User.storedPaymentSources.channel ● String scalar miscellaneous
Slug of a channel for which the data should be returned.
User.languageCode ● LanguageCodeEnum! non-null enum miscellaneous
User language code.
User.defaultShippingAddress ● Address object users
The default shipping address of the user.
User.defaultBillingAddress ● Address object users
The default billing address of the user.
User.externalReference ● String scalar miscellaneous
External ID of this user.
User.lastLogin ● DateTime scalar miscellaneous
The date when the user last time log in to the system.
User.dateJoined ● DateTime! non-null scalar miscellaneous
The data when the user create account.
User.updatedAt ● DateTime! non-null scalar miscellaneous
The data when the user last update the account information.
User.storedPaymentMethods ● [StoredPaymentMethod!] list object payments
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.
User.storedPaymentMethods.channel ● String! non-null scalar miscellaneous
Slug of a channel for which the data should be returned.
Interfaces
Node interface miscellaneous
An object with an ID
ObjectWithMetadata interface miscellaneous
Returned By
Member Of
AccountAddressCreate object ● AccountAddressDelete object ● AccountAddressUpdate object ● AccountChangeEmailRequested object ● AccountConfirmationRequested object ● AccountConfirmed object ● AccountDelete object ● AccountDeleted object ● AccountDeleteRequested object ● AccountEmailChanged object ● AccountRegister object ● AccountSetDefaultAddress object ● AccountSetPasswordRequested object ● AccountUpdate object ● AddressCreate object ● AddressDelete object ● AddressSetDefault object ● AddressUpdate object ● Checkout object ● ConfirmAccount object ● ConfirmEmailChange object ● CreateToken object ● CustomerBulkResult object ● CustomerCreate object ● CustomerCreated object ● CustomerDelete object ● CustomerEvent object ● CustomerMetadataUpdated object ● CustomerUpdate object ● CustomerUpdated object ● ExportEvent object ● ExportFile object ● ExternalObtainAccessTokens object ● ExternalRefresh object ● ExternalVerify object ● GiftCard object ● GiftCardEvent object ● Group object ● ListStoredPaymentMethods object ● Order object ● OrderEvent object ● OrderGrantedRefund object ● PasswordChange object ● PaymentGatewayInitializeTokenizationSession object ● PaymentMethodInitializeTokenizationSession object ● PaymentMethodProcessTokenizationSession object ● RefreshToken object ● RequestEmailChange object ● SetPassword object ● StaffCreate object ● StaffCreated object ● StaffDelete object ● StaffDeleted object ● StaffNotificationRecipient object ● StaffSetPasswordRequested object ● StaffUpdate object ● StaffUpdated object ● StoredPaymentMethodDeleteRequested object ● UserAvatarDelete object ● UserAvatarUpdate object ● UserCountableEdge object ● VerifyToken object
Implemented By
_Entity union ● IssuingPrincipal union ● UserOrApp union