henrique
03/21/2019, 9:05 PM# enums.graphql
enum PlaceCategory {
LANDSCAPE
FOOD
COFFEE
}
# types.graphql
type Place {
categories: [PlaceCategory!]!
}
// seed.js
await prisma.createPlace({
categories: ['FOOD']
})
This doesn’t work for me I get the follow error: Error: Variable '$data' expected value of type 'PlaceCreateInput!'
faure
03/22/2019, 2:29 AMfaure
03/22/2019, 2:29 AMFOOD
rather than 'FOOD'
faure
03/22/2019, 2:30 AMfaure
03/22/2019, 2:31 AMJames
03/22/2019, 8:37 AMVittorio Adamo
03/22/2019, 10:18 AMVittorio Adamo
03/22/2019, 10:19 AMnuno
03/22/2019, 12:45 PMAndrei Bacescu
03/22/2019, 2:16 PMDiscere
03/22/2019, 2:50 PMJosé Gomes
03/22/2019, 2:55 PMJosé Gomes
03/22/2019, 3:01 PMrem
03/22/2019, 3:31 PMPromise.all([
prisma.tender({ id: tenderId }).organisation(),
prisma.tender({ id: tenderId }).primaryPracticeArea(),
prisma.tender({ id: tenderId }).category(),
]).then(([organisation, primaryPracticeArea, category]) => {
// …
})
rem
03/22/2019, 3:32 PMprisma.tender({ id … })
?rem
03/22/2019, 3:32 PMJosé Gomes
03/22/2019, 3:32 PMJosé Gomes
03/22/2019, 3:33 PMJosé Gomes
03/22/2019, 3:33 PMrem
03/22/2019, 3:37 PMcedric
03/22/2019, 4:43 PMid
, and that field is reserved by prisma for ID types. i'm looking for something like myID: Int @pgColumn(name="id")
cedric
03/22/2019, 4:45 PM@pgRelation
but it seems like that's geared toward FKsSebastian
03/22/2019, 4:46 PMTerribleDev
03/22/2019, 5:02 PMTerribleDev
03/22/2019, 5:02 PMIan
03/22/2019, 5:02 PMMichael Schonfeld
03/22/2019, 6:16 PMMichael Schonfeld
03/22/2019, 6:16 PMemail
), shouldn’t my PG (or prisma, for that matter) create an index based on that lookup column?levi chimezie
03/22/2019, 7:53 PMDevion Villegas
03/22/2019, 8:48 PM