-
I would appreciate the group's guidance on how to best leverage the node template cli generated app to make REST API calls. There are a lot of built in helpers that I would like to use. To start I wanted to expand on the "ProductsCard" component and modify the code below to point to a different URL. I am unable to use "useAppQuery" and would be great to get some help. const { I wanted to fetch the total number of customers which should be simple end point change to "/admin/api/customers/count" however this generates this error: "Failed to load resource: the server responded with a status of 500 ()" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @SaiSa22 ! As I can see here: https://shopify.dev/api/admin-rest/2022-04/resources/customer Try 2022-07 instead of 2022-04 |
Beta Was this translation helpful? Give feedback.
-
Try to remove /admin/: |
Beta Was this translation helpful? Give feedback.
-
Hey @SaiSa22 ! You need to make changes in index.js on line 104:
You need to replace Product with Customer. You don't need to change the URL in ProductsCard.jsx. The URL in ProductsCard.jsx and in index.js:
must be equal to make it work, this is "Routing". |
Beta Was this translation helpful? Give feedback.
Hey @SaiSa22 ! You need to make changes in index.js on line 104:
You need to replace Product with Customer.
You don't need to change the URL in …