Repository: saleor/saleor

Issue:
Consider changing order lines to a list
Currently, the `lines` field in the `Order` type is a connection. I think we should simplify this and change it to a simple `graphene.List`. I cannot imagine a situation where pagination of those lines should be necessary. 

The query currently looks like this:

```
{
  order {
    id
    lines {
      edges {
        node {
          quantity
          productName
        }
      }
    }
  }
}
```

We could change it to:
```
{
  order {
    id
    lines {
      quantity
      productName
    }
  }
}
```


Discussion:
@maarcingebala Shall we proceed?
I think yes. @dominik-zeglen knows of few other nested connections that could be turned into lists, as we shouldn't ever paginate them in UI.

Resolving patch:
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -87,6 +87,27 @@ class Meta:
         exclude_fields = ['fulfillment']
 
 
+class OrderLine(CountableDjangoObjectType):
+    thumbnail_url = graphene.String(
+        description='The URL of a main thumbnail for the ordered product.',
+        size=graphene.Int(description='Size of the image'))
+
+    class Meta:
+        description = 'Represents order line of particular order.'
+        model = models.OrderLine
+        interfaces = [relay.Node]
+        exclude_fields = [
+            'order', 'unit_price_gross', 'unit_price_net', 'variant']
+
+    def resolve_thumbnail_url(self, info, size=None):
+        if not self.variant_id:
+            return None
+        if not size:
+            size = 255
+        return get_thumbnail(
+            self.variant.get_first_image(), size, method='thumbnail')
+
+
 class Order(CountableDjangoObjectType):
     fulfillments = graphene.List(
         Fulfillment,
@@ -114,6 +135,9 @@ class Order(CountableDjangoObjectType):
     available_shipping_methods = graphene.List(
         ShippingMethod, required=False,
         description='Shipping methods that can be used with this order.')
+    lines = graphene.List(
+        OrderLine, required=True,
+        description='List of order lines for the order')
 
     class Meta:
         description = 'Represents an order in the shop.'
@@ -180,23 +204,6 @@ def resolve_available_shipping_methods(obj, info):
         from .resolvers import resolve_shipping_methods
         return resolve_shipping_methods(obj, info)
 
-
-class OrderLine(CountableDjangoObjectType):
-    thumbnail_url = graphene.String(
-        description='The URL of a main thumbnail for the ordered product.',
-        size=graphene.Int(description='Size of the image'))
-
-    class Meta:
-        description = 'Represents order line of particular order.'
-        model = models.OrderLine
-        interfaces = [relay.Node]
-        exclude_fields = [
-            'order', 'unit_price_gross', 'unit_price_net', 'variant']
-
-    def resolve_thumbnail_url(self, info, size=None):
-        if not self.variant_id:
-            return None
-        if not size:
-            size = 255
-        return get_thumbnail(
-            self.variant.get_first_image(), size, method='thumbnail')
+    @staticmethod
+    def resolve_lines(obj, info):
+        return obj.lines.all()


Test patch:
diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap
@@ -17332,27 +17332,146 @@ exports[`Storyshots Views / Orders / Order details as a draft 1`] = `
                 class="MuiTableRow-root-id"
               >
                 <td
-                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-avatarCell-id"
                 >
-                  <div
-                    class="MuiAvatar-root-id MuiAvatar-colorDefault-id Component-avatar-id"
+                  <button
+                    class="MuiButtonBase-root-id MuiIconButton-root-id OrderProducts-deleteIcon-id"
+                    tabindex="0"
+                    type="button"
                   >
-                    <svg
-                      aria-hidden="true"
-                      class="MuiSvgIcon-root-id"
-                      focusable="false"
-                      viewBox="0 0 24 24"
+                    <span
+                      class="MuiIconButton-label-id"
                     >
-                      <g>
-                        <path
-                          d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"
-                        />
-                      </g>
-                    </svg>
+                      <svg
+                        aria-hidden="true"
+                        class="MuiSvgIcon-root-id"
+                        focusable="false"
+                        viewBox="0 0 24 24"
+                      >
+                        <g>
+                          <path
+                            d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
+                          />
+                        </g>
+                      </svg>
+                    </span>
+                    <span
+                      class="MuiTouchRipple-root-id"
+                    />
+                  </button>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner, Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123021
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-container-id OrderProducts-textRight-id"
+                >
+                  <div>
+                    <span
+                      class="MuiTypography-root-id MuiTypography-caption-id Component-text-id"
+                    >
+                      1
+                    </span>
                   </div>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-avatarCell-id"
+                >
+                  <button
+                    class="MuiButtonBase-root-id MuiIconButton-root-id OrderProducts-deleteIcon-id"
+                    tabindex="0"
+                    type="button"
+                  >
+                    <span
+                      class="MuiIconButton-label-id"
+                    >
+                      <svg
+                        aria-hidden="true"
+                        class="MuiSvgIcon-root-id"
+                        focusable="false"
+                        viewBox="0 0 24 24"
+                      >
+                        <g>
+                          <path
+                            d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
+                          />
+                        </g>
+                      </svg>
+                    </span>
+                    <span
+                      class="MuiTouchRipple-root-id"
+                    />
+                  </button>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner and Graham
+                  </span>
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123022
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-container-id OrderProducts-textRight-id"
+                >
+                  <div>
+                    <span
+                      class="MuiTypography-root-id MuiTypography-caption-id Component-text-id"
+                    >
+                      2
+                    </span>
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
                   <span
                     class="Skeleton-skeleton-id"
@@ -17360,8 +17479,55 @@ exports[`Storyshots Views / Orders / Order details as a draft 1`] = `
                     ‌
                   </span>
                 </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-avatarCell-id"
+                >
+                  <button
+                    class="MuiButtonBase-root-id MuiIconButton-root-id OrderProducts-deleteIcon-id"
+                    tabindex="0"
+                    type="button"
+                  >
+                    <span
+                      class="MuiIconButton-label-id"
+                    >
+                      <svg
+                        aria-hidden="true"
+                        class="MuiSvgIcon-root-id"
+                        focusable="false"
+                        viewBox="0 0 24 24"
+                      >
+                        <g>
+                          <path
+                            d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
+                          />
+                        </g>
+                      </svg>
+                    </span>
+                    <span
+                      class="MuiTouchRipple-root-id"
+                    />
+                  </button>
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123023
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
                   <span
                     class="Skeleton-skeleton-id"
@@ -17369,6 +17535,17 @@ exports[`Storyshots Views / Orders / Order details as a draft 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-container-id OrderProducts-textRight-id"
+                >
+                  <div>
+                    <span
+                      class="MuiTypography-root-id MuiTypography-caption-id Component-text-id"
+                    >
+                      7
+                    </span>
+                  </div>
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -17378,6 +17555,53 @@ exports[`Storyshots Views / Orders / Order details as a draft 1`] = `
                     ‌
                   </span>
                 </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-avatarCell-id"
+                >
+                  <button
+                    class="MuiButtonBase-root-id MuiIconButton-root-id OrderProducts-deleteIcon-id"
+                    tabindex="0"
+                    type="button"
+                  >
+                    <span
+                      class="MuiIconButton-label-id"
+                    >
+                      <svg
+                        aria-hidden="true"
+                        class="MuiSvgIcon-root-id"
+                        focusable="false"
+                        viewBox="0 0 24 24"
+                      >
+                        <g>
+                          <path
+                            d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
+                          />
+                        </g>
+                      </svg>
+                    </span>
+                    <span
+                      class="MuiTouchRipple-root-id"
+                    />
+                  </button>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123024
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -17387,6 +17611,17 @@ exports[`Storyshots Views / Orders / Order details as a draft 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-container-id OrderProducts-textRight-id"
+                >
+                  <div>
+                    <span
+                      class="MuiTypography-root-id MuiTypography-caption-id Component-text-id"
+                    >
+                      3
+                    </span>
+                  </div>
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -18040,31 +18275,137 @@ exports[`Storyshots Views / Orders / Order details as a unpaid order 1`] = `
                   class="MuiTableCell-root-id MuiTableCell-head-id"
                   scope="col"
                 >
-                  SKU
-                </th>
-                <th
-                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
-                  scope="col"
+                  SKU
+                </th>
+                <th
+                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
+                  scope="col"
+                >
+                  Unit price
+                </th>
+                <th
+                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
+                  scope="col"
+                >
+                  Quantity
+                </th>
+                <th
+                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
+                  scope="col"
+                >
+                  Price
+                </th>
+              </tr>
+            </thead>
+            <tbody
+              class="MuiTableBody-root-id"
+            >
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner, Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123021
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  1
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner and Graham
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123022
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
-                  Unit price
-                </th>
-                <th
-                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
-                  scope="col"
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
-                  Quantity
-                </th>
-                <th
-                  class="MuiTableCell-root-id MuiTableCell-head-id OrderProducts-textRight-id"
-                  scope="col"
+                  2
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
-                  Price
-                </th>
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
               </tr>
-            </thead>
-            <tbody
-              class="MuiTableBody-root-id"
-            >
               <tr
                 class="MuiTableRow-root-id"
               >
@@ -18072,33 +18413,30 @@ exports[`Storyshots Views / Orders / Order details as a unpaid order 1`] = `
                   class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
                 >
                   <div
-                    class="MuiAvatar-root-id MuiAvatar-colorDefault-id Component-avatar-id"
+                    class="MuiAvatar-root-id Component-avatar-id"
                   >
-                    <svg
-                      aria-hidden="true"
-                      class="MuiSvgIcon-root-id"
-                      focusable="false"
-                      viewBox="0 0 24 24"
-                    >
-                      <g>
-                        <path
-                          d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"
-                        />
-                      </g>
-                    </svg>
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
                   </div>
                 </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
                 >
                   <span
-                    class="Skeleton-skeleton-id"
+                    class="OrderProducts-link-id"
                   >
-                    ‌
+                    Gardner and King
                   </span>
                 </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123023
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
                   <span
                     class="Skeleton-skeleton-id"
@@ -18106,6 +18444,11 @@ exports[`Storyshots Views / Orders / Order details as a unpaid order 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  7
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -18115,6 +18458,36 @@ exports[`Storyshots Views / Orders / Order details as a unpaid order 1`] = `
                     ‌
                   </span>
                 </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123024
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -18124,6 +18497,11 @@ exports[`Storyshots Views / Orders / Order details as a unpaid order 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  3
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -19095,24 +19473,97 @@ exports[`Storyshots Views / Orders / Order details when loaded data 1`] = `
                   class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
                 >
                   <div
-                    class="MuiAvatar-root-id MuiAvatar-colorDefault-id Component-avatar-id"
+                    class="MuiAvatar-root-id Component-avatar-id"
                   >
-                    <svg
-                      aria-hidden="true"
-                      class="MuiSvgIcon-root-id"
-                      focusable="false"
-                      viewBox="0 0 24 24"
-                    >
-                      <g>
-                        <path
-                          d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"
-                        />
-                      </g>
-                    </svg>
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner, Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123021
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  1
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
                   </div>
                 </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner and Graham
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123022
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  <span
+                    class="Skeleton-skeleton-id"
+                  >
+                    ‌
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  2
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
                   <span
                     class="Skeleton-skeleton-id"
@@ -19120,8 +19571,38 @@ exports[`Storyshots Views / Orders / Order details when loaded data 1`] = `
                     ‌
                   </span>
                 </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Gardner and King
+                  </span>
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123023
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
                   <span
                     class="Skeleton-skeleton-id"
@@ -19129,6 +19610,11 @@ exports[`Storyshots Views / Orders / Order details when loaded data 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  7
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -19138,6 +19624,36 @@ exports[`Storyshots Views / Orders / Order details when loaded data 1`] = `
                     ‌
                   </span>
                 </td>
+              </tr>
+              <tr
+                class="MuiTableRow-root-id"
+              >
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id"
+                >
+                  <div
+                    class="MuiAvatar-root-id Component-avatar-id"
+                  >
+                    <img
+                      class="MuiAvatar-img-id"
+                      src="placeholder60x60.png"
+                    />
+                  </div>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  <span
+                    class="OrderProducts-link-id"
+                  >
+                    Graham and King
+                  </span>
+                </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id"
+                >
+                  9123024
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
@@ -19147,6 +19663,11 @@ exports[`Storyshots Views / Orders / Order details when loaded data 1`] = `
                     ‌
                   </span>
                 </td>
+                <td
+                  class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
+                >
+                  3
+                </td>
                 <td
                   class="MuiTableCell-root-id MuiTableCell-body-id OrderProducts-textRight-id"
                 >
diff --git a/tests/api/test_order.py b/tests/api/test_order.py
--- a/tests/api/test_order.py
+++ b/tests/api/test_order.py
@@ -31,11 +31,7 @@ def test_orderline_query(admin_api_client, fulfilled_order):
                 edges {
                     node {
                         lines {
-                            edges {
-                                node {
-                                    thumbnailUrl(size: 540)
-                                }
-                            }
+                            thumbnailUrl(size: 540)
                         }
                     }
                 }
@@ -50,8 +46,7 @@ def test_orderline_query(admin_api_client, fulfilled_order):
         reverse('api'), {'query': query})
     content = get_graphql_content(response)
     order_data = content['data']['orders']['edges'][0]['node']
-    lines_data = order_data['lines']['edges']
-    thumbnails = [l['node']['thumbnailUrl'] for l in lines_data]
+    thumbnails = [l['thumbnailUrl'] for l in order_data['lines']]
     assert len(thumbnails) == 2
     assert None in thumbnails
     assert '/static/images/placeholder540x540.png' in thumbnails
@@ -77,7 +72,7 @@ def test_order_query(admin_api_client, fulfilled_order, shipping_zone):
                         }
                     }
                     lines {
-                        totalCount
+                        id
                     }
                     fulfillments {
                         fulfillmentOrder
@@ -122,7 +117,7 @@ def test_order_query(admin_api_client, fulfilled_order, shipping_zone):
     assert order_data['userEmail'] == order.user_email
     expected_price = order_data['shippingPrice']['gross']['amount']
     assert expected_price == order.shipping_price.gross.amount
-    assert order_data['lines']['totalCount'] == order.lines.count()
+    assert len(order_data['lines']) == order.lines.count()
     fulfillment = order.fulfillments.first().fulfillment_order
     fulfillment_order = order_data['fulfillments'][0]['fulfillmentOrder']
     assert fulfillment_order == fulfillment
@@ -239,13 +234,9 @@ def test_draft_order_create(
                         }
                         discountName
                         lines {
-                            edges {
-                                node {
-                                    productName
-                                    productSku
-                                    quantity
-                                }
-                            }
+                            productName
+                            productSku
+                            quantity
                         }
                         status
                         voucher {