Warren Day
06/02/2020, 4:16 PMMike SOK
06/02/2020, 4:20 PMWarren Day
06/02/2020, 4:23 PMMatt
06/02/2020, 5:23 PMconst nextAcctNum = async (state, type, ctx) => {
const prefix = state + "-" + (type === "Residential" ? "R" : "C") + "-";
highAcct = await ctx.prisma.account.findMany({
where: {
acct_num: {
startsWith: prefix,
},
},
orderBy: { acct_num: "desc" },
first: 1,
});
const highAcctNum = highAcct[0].acct_num;
let num = Number(highAcctNum.substr(5)) + 1;
let newAcctNum = prefix + num;
console.log("New Account Number: ", newAcctNum);
return newAcctNum;
};
module.exports = { nextAcctNum };
This used to work fine and return the highest account number. Now when I run it, I get this error:
Error:
Invalid `prisma.account.findMany()` invocation in
C:\Users\...\src\nextacctnum.js:3:38
{
where: {
acct_num: {
startsWith: 'AZ-R-'
}
},
orderBy: {
acct_num: 'desc'
},
first: 1
~~~~~
}
Unknown arg `first` in first for type Account. Did you mean `cursor`? Available args:
type findManyAccount {
where?: AccountWhereInput
orderBy?: AccountOrderByInput
cursor?: AccountWhereUniqueInput
take?: Int
skip?: Int
}
Does anyone have any idea why I'm getting this error now?Matt
06/02/2020, 7:51 PMJames Fox
06/03/2020, 3:11 AM"dev": "ts-node-dev -r dotenv/config --tree-kill --transpileOnly --no-notify --debug --respawn src/main.ts"
Is there a way to log more verbosely?TEMILOLUWA OJO PHILIP
06/03/2020, 5:45 AMRahul Bhooteshwar
06/03/2020, 3:22 PMprisma deploy
It gets errored reporting about missing tables. I have tried to clean my database, docker instance (deleted the container), recomposing docker for prisma bit no luck at all.
prisma delete
is also having error!
Can someone guide me here? I want a fresh start with Prisma v1 & Docker.jruiseco
06/03/2020, 3:29 PMAgrippa Kellum
06/03/2020, 6:51 PMAshiqur Rahman
06/04/2020, 6:55 AMAbhischek
06/04/2020, 2:04 PMmilestones: [Milestone]
type Milestone @embedded {
_id: ID!
name: String!
description: String
completed: DateTime
}
But when querying that field in the parent via:
milestones{
_id
}
I get: TypeError: prismaClient[parentName](...)[fieldName] is not a function
Any suggestions what I'm doing wrong?Ankush Gumber
06/04/2020, 3:19 PMAnkush Gumber
06/04/2020, 3:20 PMAnkush Gumber
06/04/2020, 3:24 PMAnkush Gumber
06/04/2020, 3:24 PMAnkush Gumber
06/04/2020, 3:24 PMroberto.guerra
06/04/2020, 3:26 PMDavid Shurgold
06/04/2020, 3:53 PMGabriel Benson
06/04/2020, 7:05 PMJody LeCompte
06/04/2020, 7:08 PMprisma init
. Any help is greatly appreciated as I could not find anything googlingAlejandro Sanchez
06/04/2020, 8:21 PMError: Cannot return null for non-nullable field Home.name.
Matt
06/05/2020, 2:10 AMPhilipp Rajah Moura Srivastava
06/05/2020, 4:08 AMSEHYEOK
06/05/2020, 7:37 AMwhereInput
.
what i want to do is comparing two field in whereInput.
there are showMessageDateA(type DATE), updatedAt(type Date),
So I wanna get data that it's updatedAt greater than it's showMessageDateA
I don't know if it is possible So.. could you please let me if it is possible.. and how the thing work
please look at line 14
thank youIan Buss
06/05/2020, 9:43 AMnpx prisma init
it doesn't generate the prisma schema or any of the files it should? 😞Ian Buss
06/05/2020, 11:05 AMReuben Sutton
06/05/2020, 2:16 PMAlejandro Sanchez
06/06/2020, 3:01 AMSm03leBr00t
06/06/2020, 8:39 AM