gatsbyjs / gatsby-starter-shopify

A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart
https://shopify-demo.gatsbyjs.com/
BSD Zero Clause License
311 stars 137 forks source link

Cors Issue #41

Closed TylerOlthuizen closed 3 years ago

TylerOlthuizen commented 3 years ago

Getting a Cors issue that is causing a fetch error. Any way to add fetch options or 'Access-Control-Allow-Origin': '*',


import fetch from "isomorphic-fetch"
import Client from "shopify-buy"

const client = Client.buildClient(
  {
    domain: `sandbox-idrinkcoffee-com.myshopify.com/api/2021-01/graphql.json`,
    storefrontAccessToken:  `MYTOKENKEY`,
  },
  fetch,
)