Skip to content

Commit ccd430d

Browse files
committed
fix: trigger deploy
1 parent eecc7c8 commit ccd430d

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Transforms prisma schema into graphql schema
44

5+
## Install
6+
```bash
7+
npm i prisma-generator-graphql-typedef
8+
```
9+
510
## Example
611
This prisma schema:
712
```bash

packages/generator/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# prisma-generator-graphql-typedef
2+
3+
Transforms prisma schema into graphql schema
4+
5+
## Install
6+
```bash
7+
npm i prisma-generator-graphql-typedef
8+
```
9+
10+
## Example
11+
This prisma schema:
12+
```bash
13+
model User {
14+
id Int @id @default(autoincrement())
15+
createdAt DateTime @default(now())
16+
updatedAt DateTime @updatedAt
17+
/// @gqlIgnore
18+
password String
19+
email String @unique
20+
name String?
21+
posts Post[]
22+
profile Profile?
23+
/// user role
24+
role Role @default(USER)
25+
}
26+
```
27+
Will generate this graphql schema:
28+
```bash
29+
type User {
30+
id: Int
31+
createdAt: DateTime
32+
updatedAt: DateTime
33+
email: String
34+
name: String
35+
posts: Post[]
36+
profile: Profile
37+
role: Role
38+
}
39+
```
40+
41+
> This generator was bootstraped using [create-prisma-generator](https://github.com/YassinEldeeb/create-prisma-generator)

0 commit comments

Comments
 (0)