Skip to content

Commit ca9d513

Browse files
committed
deploying prisma server to heroku
1 parent 5c02309 commit ca9d513

3 files changed

Lines changed: 17 additions & 9 deletions

File tree

backend/datamodel.prisma

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ enum Permission {
88
}
99

1010
type 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

2121
type 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

3131
type 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

3939
type 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

5050
type Order {
51-
id: ID! @unique
51+
id: ID! @id
5252
items: [OrderItem!]!
5353
total: Int!
5454
user: User!

backend/prisma.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
endpoint: ${env:PRISMA_ENDPOINT}
1+
#endpoint: ${env:PRISMA_ENDPOINT}
2+
endpoint: https://sick-fits-prod-cw-46f6ae1d5e.herokuapp.com/sicks-fits-prod/prod
23
datamodel: datamodel.prisma
3-
# secret: ${env:PRISMA_SECRET}
4+
secret: ${env:PRISMA_SECRET}
45

56
generate:
67
- generator: graphql-schema

backend/src/generated/prisma.graphql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type CartItemConnection {
3636
}
3737

3838
input CartItemCreateInput {
39+
id: ID
3940
quantity: Int
4041
item: ItemCreateOneInput
4142
user: UserCreateOneWithoutCartInput!
@@ -47,6 +48,7 @@ input CartItemCreateManyWithoutUserInput {
4748
}
4849

4950
input CartItemCreateWithoutUserInput {
51+
id: ID
5052
quantity: Int
5153
item: ItemCreateOneInput
5254
}
@@ -218,6 +220,7 @@ type ItemConnection {
218220
}
219221

220222
input ItemCreateInput {
223+
id: ID
221224
title: String!
222225
description: String!
223226
image: String
@@ -473,6 +476,7 @@ type OrderConnection {
473476
}
474477

475478
input OrderCreateInput {
479+
id: ID
476480
items: OrderItemCreateManyInput
477481
total: Int!
478482
user: UserCreateOneInput!
@@ -502,6 +506,7 @@ type OrderItemConnection {
502506
}
503507

504508
input OrderItemCreateInput {
509+
id: ID
505510
title: String!
506511
description: String!
507512
image: String!
@@ -1003,6 +1008,7 @@ type UserConnection {
10031008
}
10041009

10051010
input UserCreateInput {
1011+
id: ID
10061012
name: String!
10071013
email: String!
10081014
password: String!
@@ -1027,6 +1033,7 @@ input UserCreatepermissionsInput {
10271033
}
10281034

10291035
input UserCreateWithoutCartInput {
1036+
id: ID
10301037
name: String!
10311038
email: String!
10321039
password: String!

0 commit comments

Comments
 (0)