Hello, I wanted to know how can I execute an SQL q...
# orm-help
y
Hello, I wanted to know how can I execute an SQL query directly to the my Postgres DB? I want to query an avg of one of the parameters in my DB
r
Should help: https://www.prisma.io/docs/prisma-graphql-api/reference/raw-database-access-qwe4/ - IIRC you need to set a prisma.yml config option too (might be in the doc url)
y
I configured my docker-compose file with the enable raw attribute by how I execute it with my code?
const mutation =
Copy code
mutation {
        executeRaw(query: "SELECT * FROM default$default."User"")
      }
return prisma.$graphql(mutation)
the code above not working