File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,18 +8,18 @@ enum Permission {
88}
99
1010type User {
11- id : ID ! @unique
11+ id : ID ! @id
1212 name : String !
1313 email : String ! @unique
1414 password : String !
1515 resetToken : String
1616 resetTokenExpiry : Float
17- permissions : [Permission]
18- cart : [CartItem!]!
17+ permissions : [Permission] @scalarList ( strategy : RELATION )
18+ cart : [CartItem!]! @scalarList ( strategy : RELATION )
1919}
2020
2121type Item {
22- id : ID ! @unique
22+ id : ID ! @id
2323 title : String !
2424 description : String !
2525 image : String
@@ -29,15 +29,15 @@ type Item {
2929}
3030
3131type CartItem {
32- id : ID ! @unique
32+ id : ID ! @id
3333 quantity : Int ! @default (value : 1 )
3434 # its possible to have a cartItem where the item has been deleted
3535 item : Item #relationship to Item
3636 user : User ! #relationship to User
3737}
3838
3939type OrderItem {
40- id : ID ! @unique
40+ id : ID ! @id
4141 title : String !
4242 description : String !
4343 image : String !
@@ -48,7 +48,7 @@ type OrderItem {
4848}
4949
5050type Order {
51- id : ID ! @unique
51+ id : ID ! @id
5252 items : [OrderItem!]!
5353 total : Int !
5454 user : User !
Original file line number Diff line number Diff line change 1- endpoint : ${env:PRISMA_ENDPOINT}
1+ # endpoint: ${env:PRISMA_ENDPOINT}
2+ endpoint : https://sick-fits-prod-cw-46f6ae1d5e.herokuapp.com/sicks-fits-prod/prod
23datamodel : datamodel.prisma
3- # secret: ${env:PRISMA_SECRET}
4+ secret : ${env:PRISMA_SECRET}
45
56generate :
67 - generator : graphql-schema
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ type CartItemConnection {
3636}
3737
3838input CartItemCreateInput {
39+ id : ID
3940 quantity : Int
4041 item : ItemCreateOneInput
4142 user : UserCreateOneWithoutCartInput !
@@ -47,6 +48,7 @@ input CartItemCreateManyWithoutUserInput {
4748}
4849
4950input CartItemCreateWithoutUserInput {
51+ id : ID
5052 quantity : Int
5153 item : ItemCreateOneInput
5254}
@@ -218,6 +220,7 @@ type ItemConnection {
218220}
219221
220222input ItemCreateInput {
223+ id : ID
221224 title : String !
222225 description : String !
223226 image : String
@@ -473,6 +476,7 @@ type OrderConnection {
473476}
474477
475478input OrderCreateInput {
479+ id : ID
476480 items : OrderItemCreateManyInput
477481 total : Int !
478482 user : UserCreateOneInput !
@@ -502,6 +506,7 @@ type OrderItemConnection {
502506}
503507
504508input OrderItemCreateInput {
509+ id : ID
505510 title : String !
506511 description : String !
507512 image : String !
@@ -1003,6 +1008,7 @@ type UserConnection {
10031008}
10041009
10051010input UserCreateInput {
1011+ id : ID
10061012 name : String !
10071013 email : String !
10081014 password : String !
@@ -1027,6 +1033,7 @@ input UserCreatepermissionsInput {
10271033}
10281034
10291035input UserCreateWithoutCartInput {
1036+ id : ID
10301037 name : String !
10311038 email : String !
10321039 password : String !
You can’t perform that action at this time.
0 commit comments