MageSmith
QueryCustomer · Magento 2.4.9

customer

customer is a Magento 2 GraphQL query in the Customer module. Return detailed information about a customer account. It returns Customer and requires an Authorization header (Bearer customer token).

Last verified: against Magento 2.4.9.

Returns

Customer

Resolver class

Magento\CustomerGraphQl\Model\Resolver\Customer

Cache

cacheable: no

Example request

Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.

Headers

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline
Authorization
Bearer <CUSTOMER_TOKEN> obtain from generateCustomerToken mutation

Query

query {
  customer {
    compare_list {
      uid
      items {
        uid
        product { ... }
        attributes { ... }
      }
      attributes {
        code
        label
      }
      item_count
    }
    created_at
    group_id
    prefix
    firstname
    middlename
    lastname
    suffix
    email
    default_billing
    default_shipping
    dob
    date_of_birth
    taxvat
    id
    is_subscribed
    addresses {
      id
      uid
      customer_id
      region {
        region_code
        region
        region_id
      }
      region_id
      country_id
      country_code
      street
      company
      telephone
      fax
      postcode
      city
      firstname
      lastname
      middlename
      prefix
      suffix
      vat_id
      default_shipping
      default_billing
      custom_attributes {
        attribute_code
        value
      }
      custom_attributesV2 {
        code
      }
      extension_attributes {
        attribute_code
        value
      }
    }
    addressesV2 {
      items {
        id
        uid
        customer_id
        region { ... }
        region_id
        country_id
        country_code
        street
        company
        telephone
        fax
        postcode
        city
        firstname
        lastname
        middlename
        prefix
        suffix
        vat_id
        default_shipping
        default_billing
        custom_attributes { ... }
        custom_attributesV2 { ... }
        extension_attributes { ... }
      }
      page_info {
        page_size
        current_page
        total_pages
      }
      total_count
    }
    gender
    custom_attributes {
      code
    }
    confirmation_status
    group {
      uid
    }
    allow_remote_shopping_assistance
    reviews {
      items {
        product { ... }
        summary
        text
        nickname
        created_at
        average_rating
        ratings_breakdown { ... }
      }
      page_info {
        page_size
        current_page
        total_pages
      }
    }
    orders {
      items {
        gift_message { ... }
        id
        order_date
        status
        number
        items { ... }
        total { ... }
        invoices { ... }
        shipments { ... }
        credit_memos { ... }
        payment_methods { ... }
        shipping_address { ... }
        billing_address { ... }
        carrier
        shipping_method
        comments { ... }
        increment_id
        order_number
        created_at
        grand_total
        token
        applied_coupons { ... }
        email
        is_virtual
        available_actions
        customer_info { ... }
        order_status_change_date
      }
      page_info {
        page_size
        current_page
        total_pages
      }
      total_count
      date_of_first_order
    }
    wishlists {
      id
      items {
        id
        qty
        description
        added_at
        product { ... }
      }
      items_v2 {
        items { ... }
        page_info { ... }
      }
      items_count
      sharing_code
      updated_at
    }
    wishlist {
      id
      items {
        id
        qty
        description
        added_at
        product { ... }
      }
      items_v2 {
        items { ... }
        page_info { ... }
      }
      items_count
      sharing_code
      updated_at
    }
    wishlist_v2 {
      id
      items {
        id
        qty
        description
        added_at
        product { ... }
      }
      items_v2 {
        items { ... }
        page_info { ... }
      }
      items_count
      sharing_code
      updated_at
    }
  }
}

Variables

{}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.