Zane Helton
10/05/2020, 8:19 PMGiorgio Delgado
10/05/2020, 10:26 PMGiorgio Delgado
10/05/2020, 10:26 PMcomment --> post --> site
Roy
10/06/2020, 9:28 AMasync createPointsObject(
points: number,
notification: Notification,
userEmail: string
) {
return await this.prismaService.client.points.create({
data: {
points,
Notification: { connect: { id: Notification.id } },
},
});
}
Here is my schema.
model Points {
id String @id @default(cuid())
points Int
createdAt DateTime @default(now())
Notification Notification
}
model Notification {
id String @id @default(uuid())
points Points @relation(fields: [pointsId], references: [id])
pointsId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
Full Error log:
[dev ] The change you are trying to make would violate the required relation 'NotificationToPoints' between the `Notification` and `Points` models.
.....................................................
[dev ] code: 'P2014',
[dev ] meta: {
[dev ] relation_name: 'NotificationToPoints',
[dev ] model_a_name: 'Notification',
[dev ] model_b_name: 'Points'
[dev ] }
[dev ] }
Ryota Murakami
10/06/2020, 11:50 AMmilos
10/06/2020, 1:42 PMAaron Fulkerson
10/06/2020, 6:57 PMJosef Henryson
10/07/2020, 7:20 AMmilos
10/07/2020, 9:35 AMAaron Fulkerson
10/10/2020, 5:19 AMreturn await db.project.update({
data: {
features: {
update: { data: { featureDetails: { deleteMany: { featureId: id } } }, where: { id } },
delete: { id },
},
},
include: {
company: true,
features: { include: { featureDetails: { orderBy: { id: 'asc' } } } },
invoices: true,
},
where: { id: projectId },
})
Malik
10/11/2020, 2:27 AMLars Ivar Igesund
10/11/2020, 1:48 PMGabriel Oliveira
10/11/2020, 2:31 PMAbul Kashem
10/12/2020, 7:20 AMusers-MacBook-Pro:prisma user$ docker-compose up -d
prisma_postgres_1 is up-to-date
prisma_prisma_1 is up-to-date
users-MacBook-Pro:prisma user$ prisma deploy
 â¸Â  Could not connect to server at <http://localhost:4466>. Please check if your
 â¸Â  server is running.
Get in touch if you need help: <https://slack.prisma.io>
To get more detailed output, run $ export DEBUG="*"
(node:10662) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
`(Use node --trace-deprecation ...
to show where the warning was created)`Aaron Fulkerson
10/12/2020, 5:33 PMLaily Sarvarian
10/12/2020, 5:34 PMLaily Sarvarian
10/12/2020, 5:40 PMmutation CreateComment($comment: String!, $caption: ID!,$gif:String,$imgs:[String!],$urls:[urlCommentData!]) {
  createComment(
   data: {
    text: $comment
    imgs:{
     set:$imgs
    }
    urls:{
     create:$urls
    }
    gif:$gif
    user: { connect: { id: "ckg1dmbhk010707759dqhz5rq" } }
    commentOn: { connect: { id: $caption } }
   }
  ) {
 Â
   id
   text
 user{
  id
  name
 }
 commentOn{
  id
    text
   }
  }
 }
But I am getting this error:
âindex.js:26 Uncaught (in promise) Error: Variable '$urls' cannot be non input type '[urlCommentData!]'. (line 1, column 97):
mutation CreateComment($comment: String!, $caption: ID!, $gif: String, $imgs: [String!], $urls: [urlCommentData!]) {âJos
10/13/2020, 7:57 AMKJReactor
10/13/2020, 1:59 PMAaron Fulkerson
10/13/2020, 9:38 PMPieter
10/14/2020, 8:51 AMjknr
10/14/2020, 12:42 PMJustin Ellingwood
10/14/2020, 12:43 PMjruiseco
10/14/2020, 2:53 PMErr parsing connection string: invalid port number in .......:33060/mysql
tmoney
10/14/2020, 2:58 PMbrandon
10/14/2020, 3:20 PMNatalia
Ryan
10/15/2020, 7:27 AMPaul Hendrickson
10/15/2020, 7:02 PM