Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update documentation about latest changes

NyanKiyoshiade8758332e7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 19636284b7..dd949376bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable, unreleased changes to this project will be documented in this file.
## [Unreleased]
- Cleanup code for updated function names, unused argument, etc. - #4090 by @jxltom
- Merge authorize with capture - #4098 by @korycins, @NyanKiyoshi
+- Order Events containing order lines or fulfillment lines now return the line object in the GraphQL API - #4114 by @NyanKiyoshi
## 2.6.0
diff --git a/docs/architecture/events.rst b/docs/architecture/events.rst
index 797f992abb..6e6a0b6122 100644
--- a/docs/architecture/events.rst
+++ b/docs/architecture/events.rst
@@ -9,47 +9,47 @@ Events
Order Events
------------
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| Code | GraphQL API value | Description | Additional Parameters (GraphQL) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``draft_created`` | ``DRAFT_CREATED`` | A draft order was created by the staff user. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``draft_added_products`` | ``DRAFT_ADDED_PRODUCTS`` | The staff user added products to a draft order. | ``lines`` a list of objects containing a ``quantity`` (int) and a ``item`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``draft_removed_products`` | ``DRAFT_REMOVED_PRODUCTS`` | The staff user removed products from a draft order. | ``lines`` a list of objects containing a ``quantity`` (int) and a ``item`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``placed`` | ``PLACED`` | An order was placed by the customer. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``draft_placed`` | ``PLACED_FROM_DRAFT`` | An order was created from draft by the staff user. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``oversold_items`` | ``OVERSOLD_ITEMS`` | An order was created from draft, but some line items were oversold. | ``oversold_items`` a list of items (strings) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``canceled`` | ``CANCELED`` | The order was cancelled. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``order_paid`` | ``ORDER_PAID`` | The order was fully paid by the customer. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``marked_as_paid`` | ``MARKED_AS_PAID`` | The order was manually marked as fully paid by the staff user. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``email_sent`` | ``EMAIL_SENT`` | An email was sent to the customer. | ``email`` (string), ``email_type`` (``OrderEventsEmailsEnum``) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``captured`` | ``CAPTURED`` | The payment was captured. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``refunded`` | ``REFUNDED`` | The payment was refunded. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``voided`` | ``VOIDED`` | The payment was voided. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``payment_failed`` | ``PAYMENT_FAILED`` | The payment failed. | ``message`` (string), ``payment_id`` (string, optional), ``payment_gateway`` (string, optional) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``fulfillment_canceled`` | ``FULFILLMENT_CANCELED`` | Fulfillment for one or more of the items was canceled. | ``composed_id`` (int) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``restocked_items`` | ``RESTOCKED_ITEMS`` | One or more of the order's items have been resocked | ``quantity`` (int) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``fulfilled_items`` | ``FULFILLED_ITEMS`` | One or more of the order's items have been fulfilled. | ``fulfilled_items`` a list of objects containing a ``quantity`` (int) and a ``item`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``note_added`` | ``NOTE_ADDED`` | A note was added to the order by the staff. | ``message`` (string) |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
-| ``other`` | ``OTHER`` | Status used during reimporting of the legacy events. | None. |
-+----------------------------+----------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| Code | GraphQL API value | Description | Additional Parameters (GraphQL) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``draft_created`` | ``DRAFT_CREATED`` | A draft order was created by the staff user. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``draft_added_products`` | ``DRAFT_ADDED_PRODUCTS`` | The staff user added products to a draft order. | ``lines`` a list of objects containing a ``quantity`` (int), a ``line_pk`` (int) and a ``item_name`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``draft_removed_products`` | ``DRAFT_REMOVED_PRODUCTS`` | The staff user removed products from a draft order. | ``lines`` a list of objects containing a ``quantity`` (int), a ``line_pk`` (int) and a ``item_name`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``placed`` | ``PLACED`` | An order was placed by the customer. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``draft_placed`` | ``PLACED_FROM_DRAFT`` | An order was created from draft by the staff user. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``oversold_items`` | ``OVERSOLD_ITEMS`` | An order was created from draft, but some line items were oversold. | ``oversold_items`` a list of items (strings) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``canceled`` | ``CANCELED`` | The order was cancelled. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``order_paid`` | ``ORDER_PAID`` | The order was fully paid by the customer. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``marked_as_paid`` | ``MARKED_AS_PAID`` | The order was manually marked as fully paid by the staff user. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``email_sent`` | ``EMAIL_SENT`` | An email was sent to the customer. | ``email`` (string), ``email_type`` (``OrderEventsEmailsEnum``) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``captured`` | ``CAPTURED`` | The payment was captured. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``refunded`` | ``REFUNDED`` | The payment was refunded. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``voided`` | ``VOIDED`` | The payment was voided. | ``amount`` (float), ``payment_id`` (string), ``payment_gateway`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``payment_failed`` | ``PAYMENT_FAILED`` | The payment failed. | ``message`` (string), ``payment_id`` (string, optional), ``payment_gateway`` (string, optional) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``fulfillment_canceled`` | ``FULFILLMENT_CANCELED`` | Fulfillment for one or more of the items was canceled. | ``composed_id`` (int) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``restocked_items`` | ``RESTOCKED_ITEMS`` | One or more of the order's items have been resocked | ``quantity`` (int) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``fulfilled_items`` | ``FULFILLED_ITEMS`` | One or more of the order's items have been fulfilled. | ``fulfilled_items`` a list of ``line_pk`` (int) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``note_added`` | ``NOTE_ADDED`` | A note was added to the order by the staff. | ``message`` (string) |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
+| ``other`` | ``OTHER`` | Status used during reimporting of the legacy events. | None. |
++----------------------------+----------------------------+---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
Email Event Types
-----------------