Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Graphql query for only line item additions in an order edit.

Graphql query for only line item additions in an order edit.

pepsimax2k
Tourist
12 0 0

Hey all, does anyone know a query that'll return (eventually) only line items that have been added during an order edit? I only know how to do it for the full order as follows (this is from a orders/edited webhook), but need to avoid (somehow) items that weren't added during the edit. Bonus if you can retain the fulfillment location filter.

 {% capture query %}
    query {
      order(id: {{ order_edit.order.admin_graphql_api_id | json }}) {
        fulfillmentOrders(
          first: 10
          query: "assigned_location_id:{{ shop.primary_location_id }}"
	) {
          nodes {
            lineItems(first: 100) {
              nodes {
                totalQuantity
		variant {
		  id
		}
              }
            }
          }
        }
      }
    }
  {% endcapture %}

  

Replies 0 (0)