Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,231
  • Linux
  • Apple
tests.ts1.58 kB
import testMatrix from './_matrix' // @ts-ignore import type { PrismaClient } from './generated/prisma/client' declare let prisma: PrismaClient testMatrix.setupTestSuite( () => { test('simple object', async () => { const result = await prisma.entry.create({ data: { json: { x: 1 } }, }) expect(result).toMatchObject({ json: { x: 1 }, }) }) test('empty object', async () => { const result = await prisma.entry.create({ data: { json: {} }, }) expect(result).toMatchObject({ json: {}, }) }) // Regression test for https://github.com/prisma/prisma/issues/14274 // and https://github.com/prisma/prisma/issues/14342 test('object with no prototype', async () => { const result = await prisma.entry.create({ data: { json: Object.create(null) }, }) expect(result).toMatchObject({ json: {}, }) }) // regression test for https://github.com/prisma/prisma/issues/20192 test('object with .toJSON method', async () => { const value = { toJSON: () => 'some value', } const url = new URL('http://example.com/') const result = await prisma.entry.create({ data: { json: { value, url } }, }) expect(result).toMatchObject({ json: { value: 'some value', url: 'http://example.com/', }, }) }) }, { optOut: { from: ['sqlserver'], reason: ` sqlserver - connector does not support Json type `, }, }, )

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