This is a NextJS typescript project with Prisma ORM and Apollo GraphQL.
Install all your dependencies using,
yarn
# or
npm i
-
Add your database url in environment variable
DATABASE_URL
. (replace .env.example to .env) -
Migrate your tables from
prisma.schema
to database using,
prisma migrate dev
Once done, run your development server using,
npm run dev
# or
yarn dev
(Optional) Start your prisma studio using,
npx prisma studio
- NextJS - https://localhost:3000
- Apollo Playgroud - https://localhost:3000/api/graphql
- Prisma Studio - https://localhost:5000
nexus
- to generate schema for typescript
- In
nexus
we have to define the types manually
Using codegen
to generate types for our application based on schema.graphql
as input