Next.js Discord

Discord Forum

Fetching Shopify Products in Next.js (App Router) - Data Not Found

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Avatar
Northeast Congo LionOP
Hi everyone, I’m using Next.js 15.0.1 with the App Router and TypeScript to fetch products from the Shopify Storefront API.

Here’s what I’ve done:

1. Added SHOPIFY_STORE_DOMAIN and SHOPIFY_STOREFRONT_API_TOKEN in .env.local.


2. Created an API route in app/api/api.ts.


3. Defined types in types/types.ts for proper TypeScript handling.



Despite this setup, the console shows:

something related fetch data issues

The query works fine in Shopify GraphiQL. Is there something specific I might be missing with the App Router or TypeScript configuration?

0 Replies