Error: Unexpected end of JSON input

Error: Unexpected end of JSON input

JhonIdrovo
Visitor
2 0 0

Hi, I had my app running well. Then, I changed of pc, cloned the repo, and started working on it, I made some commits and all. Then at some point, when I tried to run the app locally the error appeared in all requests.

This is my configuration using Apollo to which I haven't made any changes before the error.

const httpLink = createHttpLink({
  uri: "https://craftsman-s.myshopify.com/api/2021-04/graphql.json",
});

const middlewareLink = setContext(() => ({
  headers: {
    "X-Shopify-Storefront-Access-Token": <token>,
    Accept: "application/json",
  },
}));

const client = new ApolloClient({
  link: middlewareLink.concat(httpLink),
  cache: new InMemoryCache(),
});

I tried updating the Shopify API version but still had the same error.

Please help me

Replies 0 (0)