magento-2
How-to, Magento, Tips & Tricks

How to Get all Order using GraphQL in Magento 2?

To retrieve all orders using GraphQL in Magento 2, you can run the following query:

query {
  orders {
    items {
      increment_id
      status
      created_at
      grand_total
      customer_firstname
      customer_lastname
    }
  }
}

This query will return an array of orders, each with the increment_id, status, created_at, grand_total, customer_firstname, and customer_lastname fields. You can modify the query to include or exclude fields as needed.

Posted by
Editorial Staff

Editorial Staff at WebShouters is a team of experts.

Leave a Reply

Your email address will not be published. Required fields are marked *