This is the example setup of the Swell + Next.JS + GraphQL blogpost: https://www.swell.is/blog/swell-next-js-graphql-building-modern-ecommerce-experiences
Next.js, Typescript and GraphQL Codegen
Install the dependencies:
pnpm install
Update the credentials in the following files:
/.graphqlrc.yml
/codegen.ts
/lib/client.ts
Then, run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.