To integrate Prisma Client with Supabase Edge Functions, follow these steps:
Create a new Edge Function in your Supabase project.
Install Prisma Client in your Edge Function's dependencies by running the following command in your Edge Function's directory:
npm install @prisma/client
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
const result = await prisma.user.findMany();
await prisma.$disconnect();
That's it! You can now use Prisma Client in your Supabase Edge Functions to interact with your database.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-13 15:21:01 +0000
Seen: 16 times
Last updated: May 13 '23
What is the process of authentication for tokens in Firebase Cloud Messaging?
How can mutual authentication be implemented on a development server for a Django web application?
What does receiving a 401 error from Netsuite REST API imply?
How can Google OAuth be integrated with FastAPI?
What is the method to only render components on the client side in NextJS 13?
How can the server update the Firebase ID token?
How can authorized API resources be utilized with a public client in Keycloak?