On this page
  1. Install the package
  2. Queries

GraphQL

The GraphQL package adds queries for individual customer price records and paginated lists.

Install the package

composer require mageb2b/pricesystem-customerprice-graph-ql:*
php bin/magento setup:upgrade
php bin/magento cache:flush

Queries

Query Use Token
customerprice(id: Int!) Read one record by ID Admin or integration
customerprices(filter, pageSize, currentPage) Search records available to an authorized caller Admin or integration
myCustomerprices(filter, pageSize, currentPage) Read prices for the signed-in customer Customer

customerprice and customerprices reject customer and guest calls with an authorization error — they are record-management queries, not storefront queries.

Use a customer token for myCustomerprices. The query derives the customer from the authenticated session rather than accepting another customer's ID. Note that entity_id is the product ID — the schema does not expose a product_id field.

query MyCustomerPrices {
  myCustomerprices(pageSize: 20, currentPage: 1) {
    total_count
    items {
      id
      customer_id
      entity_id
      qty
      value
      website_id
    }
  }
}

Request only the fields the storefront needs and paginate list queries. GraphQL reads records; use the REST API or Magento Import/Export for write workflows.