New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

prisma-client-dataproxy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-client-dataproxy

Creates a tiny (237 bytes minified & gzipped), typesafe api client using the same familiar api as your generated PrismaClient

latest
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

prisma-proxy-fetch-client

Creates a tiny (237 bytes minified & gzipped), typesafe api client using the same familiar api as your generated PrismaClient

example

For a complete example see next.js example app

// prisma.schema
model Post {
  id        Int     @id @default(autoincrement())
  title     String
  content   String?
}
import { createFetchClient } from 'prisma-proxy-fetch-client';
import type { PrismaClient } from '@prisma/client';

const baseURL = 'http://localhost:3333';
const api = createFetchClient<PrismaClient>({ baseUrl: baseURL });
const posts = await api.post.findMany({ where: { title: 'First Post' } });
// makes the following post request
//     url   http://localhost:3333/post/findMany
//     body  { "where": { "title": "First Post" }}

Running unit tests

Run nx test prisma-proxy-fetch-client to execute the unit tests via Jest.

FAQs

Package last updated on 25 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts