Join Slack
Powered by
Hello. Basic question but can’t seem to find out a...
# prisma-client
p
Paul T
10/14/2021, 10:27 PM
Hello. Basic question but can’t seem to find out anywhere in the docs. If I am using the postgres engine, is there a way to view the generated sql from a given prisma query (i.e.
prisma.model.findMany(...)
?
h
Hector
10/14/2021, 10:30 PM
Hey, you can turn on logging in the Prisma client:
https://www.prisma.io/docs/concepts/components/prisma-client/working-with-prismaclient/logging#log-to-stdout
Hector
10/14/2021, 10:30 PM
in your case,
Copy code
log: ['query']
💯 2
p
Paul T
10/14/2021, 10:47 PM
Awesome, thank you!
👍 1
Open in Slack
Previous
Next