Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
deepGet.test.ts1.45 kB
import { deepGet } from '../runtime/utils/deep-set' describe('deepGet', () => { test('work with 0', () => { const obj = { aggregateUser: { count: 0, }, } const path = ['aggregateUser', 'count'] const result = deepGet(obj, path) expect(result).toMatchInlineSnapshot(`0`) }) test('work with false', () => { const obj = { aggregateUser: { count: false, }, } const path = ['aggregateUser', 'count'] expect(deepGet(obj, path)).toMatchInlineSnapshot(`false`) }) test('work with deep object', () => { const obj = { very: { deep: { obj: { with: { deep: 'stuff', }, }, }, }, } const path = ['very', 'deep', 'obj'] expect(deepGet(obj, path)).toMatchInlineSnapshot(` { "with": { "deep": "stuff", }, } `) }) test('return undefined for invalid path', () => { const obj = { very: { deep: { obj: { with: { deep: 'stuff', }, }, }, }, } const path = ['very', 'deep', 'obj2'] expect(deepGet(obj, path)).toMatchInlineSnapshot(`undefined`) }) test('work with array', () => { const obj = [ { id: 1, }, ] const path = ['0', 'id'] expect(deepGet(obj, path)).toMatchInlineSnapshot(`1`) }) })

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