Irakli Safareli
09/27/2022, 7:51 PMAdam Braus
09/28/2022, 12:11 AMHusnain Saeed
09/28/2022, 6:44 PMSebastian Gug
09/29/2022, 12:24 PM<https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript>
prisma is not among the available languages, and if it's not possible, any ideas on what's the next best thing to use?manuel
09/30/2022, 2:52 PMMatheus Assis
09/30/2022, 5:18 PM/page
, then passing data
or data.whatever
down to each component
But if each component is now doing its own request, we’re coming back to the REST pattern anyway. Each component does its own request, and separate requests asking for the same data like user name.
It’s just being done in a different way... But it’s the same thing. The only big difference I see is the apollo cache if using apolloJwad
10/01/2022, 10:09 PMJwad
10/01/2022, 10:09 PMRichard
10/03/2022, 12:39 PMpackages/db
package, consider adding a prisma
script to the workspace root, so that you can run all prisma CLI commands from the root naturally:
# from your workspace-root:
pnpm prisma generate
pnpm prisma migrate dev
pnpm prisma db push
looks like this:
{
scripts: {
"prisma": "pnpm --filter db exec prisma"
}
}
Wrote it about it here.Vivek Poddar
10/03/2022, 6:16 PMSyun Matsunaga
10/04/2022, 4:19 AMRexford Koomson
10/04/2022, 8:59 AMSebastian Gug
10/04/2022, 11:06 AMSebastian Gug
10/04/2022, 11:07 AMEvangelos Charalampidis
10/06/2022, 11:56 AMTimothy Choi
10/16/2022, 8:30 PMMeetSnowmaker
10/17/2022, 2:39 PMWHERE to_tsvector(concat_ws(' ', "test"."Test"."barcode")) @@ to_tsquery($1)
instead of the index created for this pupose. is this intentional and the pg should solve the query planning? or i am missing something in the docs?Joey
10/17/2022, 3:27 PMDavid Ilizarov
10/18/2022, 6:54 PMTakeo Kusama
10/19/2022, 9:32 AM@db.Date
type if server timezone isn’t UTC.
Is there anyone can tell whether to equip patched code to prisma code is good or not I suggest in this thread (https://github.com/prisma/prisma/issues/7490#issuecomment-1283463638), I can currently avoid trouble by that, but it need that date object parsed every time, so it’s a bit bothering me, so if it could be done.Mischa
10/19/2022, 8:09 PMSlackbot
10/21/2022, 9:44 PMAaron Rackley
10/22/2022, 7:14 PMKenny Tran
10/23/2022, 6:41 AMDazzpowder
10/24/2022, 9:00 AMStephen Osei-Bonsu
10/24/2022, 1:28 PMTed Joe
10/26/2022, 2:37 PMUser {
id: String
employeeProfile: Profile[]
clientProfile Profile[] @relation("client")
}
Profile {
id: String
client User? @relation("clientProfile", fields: [clientProfileId], references: [id])
clientProfileId String?
employees User[]
}
The place where I'm having trouble is the employeeProfile. How can I do a many to man using the same tables?John Bradens
10/27/2022, 3:07 AMfunction getUserId(context) {
const Authorization = context.request.get("Authorization");
console.log("hello");
console.log(context.request);
if (Authorization) {
const token = Authorization.replace("Bearer ", "");
const { userId } = jwt.verify(token, process.env.APP_SECRET);
return userId;
}
throw new AuthError();
}
class AuthError extends Error {
constructor() {
super("Not authorized");
}
}
module.exports = {
getUserId,
AuthError,
APP_SECRET,
};
// function getUserId(req, authToken) {
// if (req) {
// const authHeader = req.headers.authorization;
// if (authHeader) {
// const token = authHeader.replace("Bearer ", "");
// if (!token) {
// throw new Error("No token found");
// }
// const { userId } = getTokenPayload(token);
// return userId;
// }
// } else if (authToken) {
// const { userId } = getTokenPayload(authToken);
// return userId;
// }
// throw new Error("Not authenticated");
// }