Replies: 1 comment
-
Hi, you should be able to query all orders for a given customer. Which customer account API are you using? Are you using the new customer account API where you would run queries with const {data, errors} = await context.customerAccount.query(
CUSTOMER_ORDERS_QUERY,
{
variables: {
...paginationVariables,
},
},
); or are you using legacy customer account API where you would run queries with const {customer} = await storefront.query(CUSTOMER_ORDERS_QUERY, {
variables: {
customerAccessToken: customerAccessToken.accessToken,
country: storefront.i18n.country,
language: storefront.i18n.language,
...paginationVariables,
},
cache: storefront.CacheNone(),
}); If you are using legacy customer account API, then it does have similar restrictions to the admin API If you are using the new customer account API, as a logged in customer, you should be able to see all your past orders. If you are not seeing all past orders, please DM @wizardlyhel in the partner slack channel and provide me your store url and we can dive deeper in the permission scope. |
Beta Was this translation helpful? Give feedback.
-
Hi! I just set up my store using the hydrogen skeleton template and for some reason customer's are only seeing orders that they have made after 11/01/2024, even when they have several orders before then.
I tried to debug and i couldn't fetch anything earlier! Using the default graphql query from /app/graphql/customer-account/CustomerOrdersQuery.
Anyone have a similar problem or insights into this? I have no idea what i'm doing wrong and it's kind of hard to debug the customer account API to be honest because there isn't a graphql explorer like for the storefront api.
Beta Was this translation helpful? Give feedback.
All reactions