Gardian Memeti
10/04/2021, 2:15 PMuser
10/04/2021, 2:38 PMRichard Prins
10/04/2021, 3:55 PMFarki
10/04/2021, 6:55 PMHarjaap Singh Makkar
10/04/2021, 8:00 PM{
"error": "\nInvalid `prisma.want.create()` invocation:\n\n\n Failed to validate the query: `Field does not exist on enclosing type.` at `Mutation.createOneWant`"
}
Hello everyone, ^ that's the error I've hit. 'Wants' is a new table I've added, I've completed the migration and run prisma generate with no issues. It's a fairly simple table and I'm supplying all the needed fields. I'd really appreciate any insights!Andrew Valleteau
10/04/2021, 8:06 PMBrent Leemans
10/04/2021, 8:24 PMMichael
10/04/2021, 8:30 PMEduardo Del Balso
10/04/2021, 10:00 PMChip Clark
10/05/2021, 2:12 AMthis.prisma.committee.findMany({
include: {
PersonCommittee: {
include: {
Person: {
select: {
PKPersonID: true,
LastName: true,
FirstName: true,
MiddleName: true,
PreferredFirstName: true,
DisplayName: true,
EmploymentStatus: true
}
}
}
}
},
where: {
AND: [
{
Active: true,
PersonCommittee: {
some: {
Person: {
EmploymentStatus: "A"
}
}
}
}
]
},
})
Chip Clark
10/05/2021, 2:17 AMthis.prisma.committee.findMany({
include: {
PersonCommittee: {
include: {
Person: {
select: {
PKPersonID: true,
LastName: true,
FirstName: true,
MiddleName: true,
PreferredFirstName: true,
DisplayName: true,
EmploymentStatus: true
}
}
}
}
},
where: {
Active: true,
PersonCommittee: {
some: {
Person: {
OR: [
{
EmploymentStatus: "A"
},
{
EmploymentStatus: "L"
},
{
EmploymentStatus: "C"
},
],
}
}
}
}
})
James
10/05/2021, 4:28 AMsmallint
in a Prism schema?James
10/05/2021, 4:30 AM@db.SmallInt
in my schema, but that gave an error in VSCode.Chris Tsongas
10/05/2021, 4:31 AM@db.SmallInt
works just fine for me.James
10/05/2021, 4:32 AMmodel Games {
id Int @id @default(autoincrement())
name String
numPlayers @db.SmallInt
}
Error validating: This line is not a valid field or attribute definition.Chris Tsongas
10/05/2021, 4:33 AMnumPlayers Int @db.SmallInt
the Int
part is the Prisma type, the other part is the Postgres type.James
10/05/2021, 4:33 AMJames
10/05/2021, 4:34 AMChris Tsongas
10/05/2021, 4:35 AMChris Tsongas
10/05/2021, 4:35 AMDante
10/05/2021, 5:27 AMuser
10/05/2021, 6:47 AMmakeSchema
function
Useful links:
• Nexus docs - Object Type: https://nexusjs.org/docs/api/object-type
• Nexus: https://nexusjs.org
• The problems of "Schema-first" GraphQL Development: https://www.prisma.io/blog/the-problems-of-schema-first-graphql-development-x1mn4cb0tyl3
• GitHub repo: https://github.com/m-abdelwahab/awesome-links
• Part 2 blog post: https://prisma.io/blog/fullstack-nextjs-graphql-prisma-2-fwpc6ds155
• Part 1 blog post: https://prisma.io/blog/fullstack-nextjs-graphql-prisma-oklidw1rhw
👉 Next video: Creating Object Types Using Nexus - https://www.youtube.com/watch?v=NaxQXClnYSE&list=PLn2e1F9Rfr6k6MwzS-p9FGK1NDBxxwLPk&index=14&pp=sAQB▾
https://www.youtube.com/watch?v=auckcBaZifw&list=PLn2e1F9Rfr6k6MwzS-p9FGK1NDBxxwLPk&index=13&pp=sAQB▾
Mykyta Machekhin
10/05/2021, 9:52 AMterion
10/05/2021, 12:08 PMJack Reed
10/05/2021, 12:10 PMLeo Li
10/05/2021, 3:59 PMcreatedAt
, I want to ensure the value is locked.Chris Tsongas
10/05/2021, 4:54 PMprisma/seed.ts
file to seed their development database with dummy data to help with coding, that doesn't get seeded in production? I'm thinking I'd like to do that by checking if (process.env.NODE_ENV === 'development')
for certain things in my seed file, am I crazy or is this an O.K. idea?Scott Berry
10/05/2021, 5:00 PMuser
10/06/2021, 6:07 AMhttps://www.youtube.com/watch?v=NaxQXClnYSE&list=PLn2e1F9Rfr6k6MwzS-p9FGK1NDBxxwLPk&index=16&pp=sAQB▾
https://www.youtube.com/watch?v=NaxQXClnYSE&list=PLn2e1F9Rfr6k6MwzS-p9FGK1NDBxxwLPk&index=14&pp=sAQB▾
Josef Henryson
10/06/2021, 6:33 AM