Daniel Netzer
01/07/2020, 3:43 PMDaniel Netzer
01/07/2020, 3:45 PMprisma introspect
cmdDaniel Netzer
01/07/2020, 3:45 PMDaniel Netzer
01/07/2020, 4:04 PMMatt Wilson
01/07/2020, 7:17 PMAhmad Hakroosh
01/08/2020, 10:25 AMAhmad Hakroosh
01/08/2020, 10:25 AMJustin Warren
01/08/2020, 1:53 PMSteffen
01/08/2020, 1:57 PMMing Yu
01/08/2020, 4:51 PMEnrico Hofmann
01/08/2020, 7:03 PMpt789
01/08/2020, 8:55 PMJames Fox
01/09/2020, 2:44 AMprisma2 init
wizard and successfully connected to an existing Postgresql DB (only has 1 model). This appeared to be successful, but when i run yarn prisma2 dev
, it tells me a migration will alter all my columns and result in data loss.
Did I do something wrong?James Fox
01/09/2020, 2:45 AMGenerators
ββββββββββββββββββββββββββββββββββββββββββββββ
Photon.js Waiting for migrations...
β οΈ There will be data loss:
β’ You are about to alter the column `description` on the `item` table, which still contains 979 non-null values. The data in that column will be lost.
Kevin Wolf
01/09/2020, 4:39 AMmodel User {
id String @default(cuid()) @id
email String @unique
password String
firstname String
lastname String
organization Organization
}
model Organization {
id String @default(cuid()) @id
name String
members User[]
}
but for Organization.members
, I want to make an array of objects like this: { role: SOME_ROLE_ENUM, user: User }
. Is there a way to do that without having to create another model like OrganizationMember
?Habeeb Ahmed
01/09/2020, 6:52 AMHabeeb Ahmed
01/09/2020, 6:54 AMHabeeb Ahmed
01/09/2020, 6:54 AMHabeeb Ahmed
01/09/2020, 6:55 AMElyon
01/09/2020, 10:48 AMtype Color {
id: ID!
title: String
hex: String
ral: String
visible: Boolean
suspended: Boolean
excludeAt: [ID]
}
input ColorInput {
id: ID
title: String
hex: String
ral: String
visible: Boolean
suspended: Boolean
excludeAt: [ID]
}
input ColorFilter {
q: String
id: ID
title: String
}
type ListMetadata {
count: Int!
}
type Query {
Color(id: ID!): Color!
allColors(
page: Int
perPage: Int
sortField: String
sortOrder: String
filter: ColorFilter
): [Color]!
_allColorsMeta(
page: Int
perPage: Int
sortField: String
sortOrder: String
filter: ColorFilter
): ListMetadata
}
type Mutation {
createColor(input: ColorInput!): Color!
updateColor(input: ColorInput!): Color!
deleteColor(id: ID!): Color!
}
what is de standard type layout to make this work, cant wrap my head arround this? @weakkyarthur
01/09/2020, 3:31 PMJames Fox
01/09/2020, 4:25 PMEnrico Hofmann
01/09/2020, 4:28 PMLukas Greb
01/09/2020, 7:25 PMserver.resolvers.Mutation.insertSomeData(someAttributeΒ =Β "Something");
but I can't find anything useful...Kevin Wolf
01/09/2020, 8:50 PMKevin Wolf
01/09/2020, 8:51 PMarthur
01/10/2020, 8:36 AMWill
01/11/2020, 8:34 AMSmakosh
01/11/2020, 3:28 PMSmakosh
01/11/2020, 3:32 PMnew Date().getFullYear()