This repository contains the service configuration for a simple Prisma Service and demonstrates how tghe Prisma Client is generated.
You can view the generated clients in the generated directory:
The clients are generated using the prisma generate command. This commands reads the information that's specified under the generate property in prisma.yml:
endpoint: http://localhost:4466
datamodel: datamodel.graphql
generate:
- generator: typescript
output: ./generated/prisma.ts
- generator: javascript
output: ./generated/prisma.js
- generator: schema
output: ./generated/prisma.graphqlThe Prisma Service is based on the following data model:
type Link {
id: ID! @unique
createdAt: DateTime!
description: String!
url: String!
postedBy: User
votes: [Vote!]!
}
type User {
id: ID! @unique
name: String!
email: String! @unique
password: String!
links: [Link!]!
votes: [Vote!]!
}
type Vote {
id: ID! @unique
link: Link!
user: User!
}To be sure you're seeing the latest version of the clients, you can re-generate them yourself using the following steps:
npm install prismadocker-compose up -dprisma deployprisma generateThis updates the following files, as specified in prisma.yml: