Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
tests.ts2.1 kB
import { Providers } from '../../_utils/providers' 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, _clientMeta, cliMeta) => { // Skipped because of https://github.com/prisma/prisma/issues/22971 // `eventId String @map("event_id")` triggers the issue. describeIf(!cliMeta.previewFeatures.includes('relationJoins'))('issue 10000', () => { afterAll(async () => { await prisma.$disconnect() }) test('issue 10000', async () => { const events = await prisma.event.create({ data: { id: 'prisma', name: 'prisma-bug', sessions: { createMany: { data: [ { id: 'g', name: 'github' }, { id: 'i', name: 'issue' }, ], }, }, }, include: { sessions: true }, }) expect(events).toMatchObject({ id: 'prisma', name: 'prisma-bug', sessions: [ { eventId: 'prisma', id: 'g', name: 'github', }, { eventId: 'prisma', id: 'i', name: 'issue', }, ], }) await prisma.event.delete({ where: { id: 'prisma' } }) const sessions = await prisma.session.findMany({ orderBy: { id: 'asc' } }) expect(sessions).toMatchObject([]) }) }) }, // Use `optOut` to opt out from testing the default selected providers // otherwise the suite will require all providers to be specified. { optOut: { from: [ Providers.MONGODB, Providers.SQLSERVER, Providers.MYSQL, Providers.POSTGRESQL, Providers.COCKROACHDB, Providers.SQLITE, ], reason: 'Only testing xyz provider(s) so opting out of xxx', }, }, )

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