KJReactor
08/02/2020, 8:46 PMRyan
08/03/2020, 6:44 AMschema.prisma
defined?KJReactor
08/03/2020, 11:59 AMKJReactor
08/03/2020, 12:00 PMKJReactor
08/03/2020, 12:01 PMRyan
08/03/2020, 12:01 PMKJReactor
08/03/2020, 12:02 PMRyan
08/03/2020, 12:08 PM@updatedAt
will not work if you haven’t created a schema.prisma
.
Also whatever you define in your schema.prisma
maps to the database when you run migrations. It has no relation whatsoever to your typedefs.js
file.Ryan
08/03/2020, 12:10 PMschema.prisma
file and then access it. This might be useful to have a look at.KJReactor
08/03/2020, 12:12 PMKJReactor
08/03/2020, 12:12 PMRyan
08/03/2020, 12:40 PMKJReactor
08/03/2020, 1:09 PMKJReactor
08/03/2020, 1:45 PMtype Product {
id: ID! @id
name: String! @unique
description: String
date: DateTime! @createdAt
dateUpdated: DateTime @updatedAt
cost: Float!
category: ProductCateg! @default(value: ELECTRONICS)
weight: Float!
height: Float!
width: Float!
rating: Float! @default(value: 0)
}
KJReactor
08/03/2020, 1:45 PM