Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Unable to access Storefront API with Apollo Client due to CORS

Unable to access Storefront API with Apollo Client due to CORS

ConorO
Visitor
1 0 1

Hello,

I'm getting a CORS error when trying to make a basic GraphQL query to the Storefront API.

Trying to initialize my client like so:

const client = new ApolloClient({
  uri: "my store",
  headers: {
    "X-Shopify-Storefront-Access-Token": "my access token",
  },
  cache: new InMemoryCache(),
});

 

How do I get around this? I'm using a private app from my normal shopify account NOT from a partner account.

Thanks

Conor 

Replies 2 (2)

JoeLum
Visitor
2 0 1

Exactly my problem as well. Can someone answer this?

mingeee
Visitor
1 0 0

I am running into the same issue. By any chance did you figured it out? 😅