adashi
03/22/2021, 5:17 PMv12.15.0 and everything works now. Would suggest that you add checks for node version numbersJaye
03/22/2021, 6:29 PMWarren Day
03/22/2021, 9:06 PMWarren Day
03/22/2021, 9:11 PM@@unique over @@indexVladi Stevanovic
Michael Adlai Arnold
03/23/2021, 5:36 PMsls package with your typescript plugin, however, it just logs those errors, but continues on its merry way. How do I configure the plugin to fail sls package on typescript compilation errors/warnings?Trevor Radcliffe
03/23/2021, 6:34 PMroot object passed into my Nexus resolvers to contain my relation fields from Prisma. ie, imagine this as a resolver for tableA
t.field('tableBFoo', {
type: 'DateTime',
async resolve(root, _args, { prisma }) {
const valueB = prisma.tableB.findUnique({
select: {
foo: true,
},
where: {
objectId: root.tableB.objectId,
},
})
return valueB.foo
},
})
root.tableA comes up null in this example. Not sure if this translates exactly, haven't tried it out, but the model for the above, if done the same way that we have it, should look like this:
model TableA {
objectId String @id
tableBId String @map("tableB")
tableB TableB? @relation(fields: [tableBId], references: [objectId])
}
model TableB {
objectId String @id
foo String
}
I know what we're doing there is pretty weird, i.e., using the name we want for the relational field for the ID in our database...We're working with (and trying to replace) a legacy system, but we would prefer to use the names as expected. Is there a way to achieve this?Mitchell
03/23/2021, 7:41 PMlink that is defined but never used? Did I miss something earlier or is something missing here?
https://www.howtographql.com/react-apollo/8-subscriptions/ali
03/23/2021, 9:54 PMmigrate to be able to create the table. Is it possible to skip creation of certain models through migrate because then migrate will try to create a table with the name of the view that I created.manuel
03/24/2021, 1:37 PMShane
03/24/2021, 2:59 PMprisma migrate with an existing DB (without resetting/losing my data), and finding the docs quite confusing -> https://www.prisma.io/docs/guides/application-lifecycle/add-prisma-migrate-to-a-project#baseline-your-production-environment
It suggests using prisma migrate dev to establish a new migration history, but this tries to run a migration -- and fails, saying it's out of sync.
Anyone able to show me the way? 🙏Shane
03/24/2021, 5:26 PMtext column length limits? Prisma seems to set it to 191, without any way to specify in the schema, and I need much longer for some columns.Shane
03/24/2021, 5:27 PMEthan Zoller
03/25/2021, 2:02 AMEthan Zoller
03/25/2021, 2:03 AMhart
03/25/2021, 6:35 AMhart
03/25/2021, 6:39 AMconst { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function main() {
const result = await prisma.mymodel.findMany({})
}
And I get the data that I inserted through prisma studio, but it's not the data in my postgres db, and it's not coming from the old sqlite one either as I've removed ithart
03/25/2021, 6:41 AMdatasource db {
provider = "postgresql"
url = "<postgresql://postgres@localhost/mydb>
}hart
03/25/2021, 6:50 AMprisma:info Started http server on <http://127.0.0.1:59079>
prisma:info Fetched a connection from the pool
I have no idea what this server is supposed to behart
03/25/2021, 6:52 AMprisma:query SELECT "public"."MyModel"."id", "public"."MyModel"."name" FROM "public"."MyModel" WHERE 1=1 OFFSET $1hart
03/25/2021, 6:52 AMpublic. prefixhart
03/25/2021, 7:09 AMJoey
03/25/2021, 9:13 AMprettier-plugin-prisma? https://github.com/umidbekk/prettier-plugin-prismaJoey
03/25/2021, 9:14 AMyarn add -D prettier-plugin-prisma any other step/configuration needed?Nino Vrijman
03/25/2021, 10:52 AMVladi Stevanovic
pizzafox
03/25/2021, 5:40 PMA record following the advice in that incident reportSun Satel
03/26/2021, 7:03 PMSun Satel
03/26/2021, 7:05 PMEthan Zoller
03/27/2021, 4:47 AM