Socket
Socket
Sign inDemoInstall

@prisma/binding-argument-transform

Package Overview
Dependencies
2
Maintainers
8
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @prisma/binding-argument-transform

![Build status](https://github.com/prisma/prisma-binding-argument-transform/workflows/CI/badge.svg)


Version published
Maintainers
8
Install size
2.00 MB
Created

Readme

Source

Prisma binding argument transform

Build status

Installation and Usage

Installation

Run yarn add @prisma/binding-argument-transform or npm i @prisma/binding-argument-transform to install it in your project.

Usage

// import { makeWherePrisma2Compatible, makeOrderByPrisma2Compatible } from '@prisma/binding-argument-transform'
const { makeWherePrisma2Compatible, makeOrderByPrisma2Compatible } = require('@prisma/binding-argument-transform')

const resolvers = {
  Query: {
    users: (_, { where, orderBy }) {
      const prisma2Where = makeWherePrisma2Compatible(where)
      const prisma2OrderBy = makeOrderByPrisma2Compatible(orderBy)
      return prisma.user.findMany({
        where: prisma2Where,
        orderBy: prisma2OrderBy,
      })
    }
  }
}

Local Development

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ESM).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

FAQs

Last updated on 15 Oct 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc