Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
tests.ts1.88 kB
import testMatrix from './_matrix' /* eslint-disable @typescript-eslint/no-unused-vars */ // @ts-ignore this is just for type checks declare let prisma: import('./generated/prisma/client').PrismaClient testMatrix.setupTestSuite( (suiteConfig, suiteMeta) => { describe('issue 12378', () => { afterAll(async () => { await prisma.$disconnect() }) test('issue 12378', async () => { const user = await prisma.user.create({ data: { email: 'user@example.com', name: 'Max', }, }) expect(user).toMatchObject({ email: 'user@example.com', name: 'Max', }) expect(user.id).toBeTruthy() const workspace = await prisma.workspace.create({ data: { name: 'workspace', users: { create: [ { user: { connect: { id: user.id, }, }, }, ], }, }, }) expect(workspace).toMatchObject({ name: 'workspace', }) expect(workspace.id).toBeTruthy() const userAsBob = await prisma.user.update({ where: { id: user.id }, data: { name: 'Bob', }, }) expect(userAsBob).toMatchObject({ email: 'user@example.com', name: 'Bob', }) expect(userAsBob.id).toBeTruthy() expect(user.id).toMatch(userAsBob.id) }) }) }, // Use `optOut` to opt out from testing the default selected providers // otherwise the suite will require all providers to be specified. { optOut: { from: ['sqlite', 'mongodb'], reason: 'Only testing PostgreSQL, MySQL, SQL Server and CockroachDB', }, }, )

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server