Skip to content

Commit

Permalink
fix(core): move orders connection under customer in respect with api
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-alexsaiannyi committed Sep 25, 2024
1 parent 7730531 commit 7c134e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-beds-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

move orders connection under customer in respect with api
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const OrderShipmentFragment = graphql(`
const CustomerAllOrders = graphql(
`
query CustomerAllOrders($after: String, $before: String, $first: Int, $last: Int) {
site {
customer {
orders(after: $after, before: $before, first: $first, last: $last) {
pageInfo {
...PaginationFragment
Expand Down Expand Up @@ -199,7 +199,7 @@ export const getCustomerOrders = cache(
fetchOptions: { cache: 'no-store' },
});

const orders = response.data.site.orders;
const orders = response.data.customer?.orders;

if (!orders) {
return undefined;
Expand Down

0 comments on commit 7c134e9

Please sign in to comment.