GraphQL query to fetch all the inventory item details from Shopify

GraphQL query to retrieve all inventory items.

Utilize afterCursor for pagination to fetch all orders, as each query instance can return a maximum of 250 orders.

 query getInventoryItems($afterCursor: String) {
                            inventoryItems(first: 250, after: $afterCursor) {
                                nodes {
                                    id
                                    sku
                                    tracked
                                }
                                pageInfo {
                                    hasNextPage
                                    endCursor
                                }
                            }
                        }

Leave a comment

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