Apollo Server + GraphQL
First, run the development server apollo:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:4000 with your browser to see the result.
Use command pnpm codegen
, then in folder create src/graphql
with files .generated.ts
/* Implement Query.product resolver logic here */
Here we will write the code for our product return function.
In file .env add information about DB connection eg.
DATABASE_URL="postgresql://postgres:[email protected]:5432/next14master?mydb?schema=public&serverVersion=16&charset=utf8"
pnpm prisma migrate dev
pnpm prisma generate