Ok, first time posting…hoping for some help. I’ve got a really good grip on the Shopify CLI app but I’m struggling with what I think is an authentication issue which I know is built in to the scaffold. Here’s my index.jsx in which I’m working with:
import ReactDOM from "react-dom";
import App from "./App";
import { initI18n } from "./utils/i18nUtils";
import {
ApolloClient,
InMemoryCache,
ApolloProvider,
createHttpLink
} from "@apollo/client";
const client = new ApolloClient({
link: new createHttpLink({
credentials: 'include',
headers: {
'Content-Type': 'application/graphql',
}
}),
uri: "https://scriptandpoly.myshopify.com/admin/api/2023-07/graphql.json",
// uri: "https://flyby-router-demo.herokuapp.com/",
cache: new InMemoryCache(),
});
// Ensure that locales are loaded before rendering the app
initI18n().then(() => {
ReactDOM.render(
,
document.getElementById("app")
);
});
I’ve hardcoded the store URI for now to troubleshoot the db issues…it works 100% fine when using an example I found online which doesn’t require auth…I can’t get the data though in my store which is using auth. Any ideas??
Thanks in advance!