All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I am following the tutorial on How to build a shopify app with Node.js and React. In this tutorial, they use GraphQL Admin API to make queries to shopify. GraphQL, however, is not fully complete and there are some components are only avaliable with the REST Admin API.
In my case, I want to retrieve all pages in a given store. This is what I have so far
const url = 'https://example-store.myshopify.com/api/pages.json';
fetch(url, { method: "GET", })
.then(response => response.json()).then(json => console.log(json))
I keep getting a 404 error, and being blocked by "CORS" I tried setting up a koa-router, but nothing is working
I there's something I am doing wrong, or another/easier method, please do let me know.
I have the exact same question here!