This broilerplate is a test example of building a Gatsby-powered storefront, pulling data from my (@rockykev) shopify account via Graphql.
- Google "Shopify Developers" to get access to their dev accounts.
You'll need to create a dev account, a store, and create items in your store. From there, get your secret key.
- Pass your keys to the file
Create a config.js file and include your keys in there.
it should look like this.
module.exports = {
shopify: {
shopname: "MY STORE NAME",
storefront: "MY STORE API KEY",
},
}
- gatsby-node.js will auto-generate your files
Using the GraphQl query, it takes all of your products, passes them to a react.create function that builds pages based on the page name.
- Create MVP with working buy button
- Create shopping cart
- Create about pages/extra pages
- Organize code to put products in product area.
Run your gatsby code with gatsby develop, or gatsby build.