Chad
09/22/2020, 5:33 AMNatalia
Logan Lee
09/22/2020, 12:48 PMawait prisma.A.create({ data }).then((e) => {
await prisma.B.delete({ where: { seq: e.seq } });
});
but delete API didn’t work even create was successed.
can i get help with it?jruiseco
09/22/2020, 2:45 PMWade Tandy
09/22/2020, 2:53 PM@prisma/engine-core
depend on a version of the Undici module, but specifically reference a commit on github instead of a version packed in NPM. Our corp environment means we can't actually install prisma in our CI/CD pipelines because of this, as all dependencies must be on NPM. Seems the referenced commit is now in a mainline release of the undici module. Can this be changed to reference a versioned number?KJReactor
09/22/2020, 3:11 PMprisma.[entity].findMany()
command would cause an error, invalid invocation
? that basically all what the error sayslucas
09/22/2020, 3:43 PMVegard Helland Flatoy
09/22/2020, 10:01 PMJustin Ellingwood
09/23/2020, 2:52 PMNatalia
mikkelsl
09/24/2020, 1:26 PMts-node -func seed() ./scripts.ts
, ts-node -func clear() ./scripts.ts
stephan
09/24/2020, 3:22 PMAaron Fulkerson
09/24/2020, 8:49 PMKJReactor
09/25/2020, 1:03 PMRoy
09/25/2020, 1:45 PMmodel User {
id String @id
email String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
profile Profile?
}
model Profile {
id String @id @default(cuid())
user User? @relation(fields: [userId], references: [id])
userId String?
playedGames PlayerInGame[]
joinedLeagues PlayerInLeague[]
}
model League {
id String @id @default(cuid())
name String @unique
games Game[]
players PlayerInLeague[]
}
model PlayerInLeague {
id String @id @default(cuid())
league League @relation(fields: [leagueId], references: [id])
player Profile @relation(fields: [profileId], references: [id])
points Int
leagueId String
profileId String
}
model Game {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
homePoints Int
awayPoints Int
league League @relation(fields: [leagueId], references: [id])
leagueId String
// HERE I NEED TO KEEP TRACK OF PLAYERS and their statistics. Who won, how many point etc.
}
model PlayerInGame {
id String @id @default(cuid())
game Game @relation(fields: [gameId], references: [id])
player Profile @relation(fields: [profileId], references: [id])
gameId Int
profileId String @unique
}
Rashmi Bidanta
09/25/2020, 2:01 PMprisma deploy --force --no-seed
we are getting an error the complains about cluster$default
ERROR: Project not found: 'cluster$default'
24-Sep-2020 22:11:59
24-Sep-2020 22:11:59 {
24-Sep-2020 22:11:59 "errors": [
24-Sep-2020 22:11:59 {
24-Sep-2020 22:11:59 "message": "Project not found: 'cluster$default'",
24-Sep-2020 22:11:59 "code": 3016,
24-Sep-2020 22:11:59 "requestId": "local:ckfhqavwf0vkh0734eamd1bd0"
24-Sep-2020 22:11:59 }
24-Sep-2020 22:11:59 ],
24-Sep-2020 22:11:59 "status": 200
24-Sep-2020 22:11:59 }
would be helpful if some guidance is provided on this. We are on Prisma 1.30.5Rashmi Bidanta
09/25/2020, 4:29 PMERROR: Variable "$input" got invalid value {"workspaceSlug":null,"clusterName":"default","serviceName":"cxic-umbrella","stageName":"prod"}; Expected non-nullable type String! not to be null at value.workspaceSlug.
{
"errors": [
{
"message": "Variable \"$input\" got invalid value {\"workspaceSlug\":null,\"clusterName\":\"default\",\"serviceName\":\"cxic-umbrella\",\"stageName\":\"prod\"}; Expected non-nullable type String! not to be null at value.workspaceSlug.",
"locations": [
{
"line": 2,
"column": 17
}
],
"code": 222
}
],
"status": 400
}
Rashmi Bidanta
09/25/2020, 4:29 PMOleg Zeltser
09/25/2020, 5:24 PMmodel A {
id Int @id
b B[]
}
model B {
id Int @id
c C[]
}
model C {
id Int @id
text String
}
Oleg Zeltser
09/25/2020, 5:30 PM"A": {"id":10 { { "text": "Some text here"}}}
Oleg Zeltser
09/25/2020, 5:32 PMprisma.a.update({wgere: id: 10}, data: {input_object})
?Oleg Zeltser
09/25/2020, 5:32 PMOleg Zeltser
09/25/2020, 5:45 PMRashmi Bidanta
09/25/2020, 8:46 PMIan Engelbrecht
09/26/2020, 8:27 AMAshiqur Rahman
09/26/2020, 1:27 PMEnrico
09/26/2020, 3:31 PMNatalia
Jarvis Prestidge
09/28/2020, 2:50 PMWrapping REST APIs with GraphQL is probably one of the most exciting applications of GraphQL — and still in its infancy. The process explained in this article was entirely manual, the real interesting part is the idea of automating the different steps. Stay tuned for more content on that topic!
If you’d like to explore this area yourself, you can already check out the graphql-binding-openapi package which allows to automatically generate GraphQL APIs (in the form of a GraphQL binding) based on a Swagger / Open API specification.Is there any advancements in auto-generated graphql gateways since, or and community agreement on the best practices etc? Any help super appreciated 🙂
fondfolio
09/28/2020, 8:59 PMfindOne
with relations fields? Our model specifically does not have a field which we can use to enforce order (via orderBy
), we just want the data read in the same order we wrote it the DB. Do we need to add an explicit order field to guarantee this order (this is what we are currently thinking of doing)? Thought we'd ask here in case anyone might have encountered this before, any help would be much appreciated, thanks! 😊