GithubHelp home page GithubHelp logo

mipyykko / nexus-plugin-prisma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from morgothulhu/nexus-plugin-prisma

0.0 0.0 0.0 5.22 MB

A plugin for Nexus that integrates Prisma

Home Page: http://nxs.li/plugins/prisma

License: MIT License

JavaScript 1.87% TypeScript 98.13%

nexus-plugin-prisma's Introduction

@morgothulhu/nexus-plugin-prisma

This plugin has been upgraded to support Prisma 4.0+. Latest version of prisma supported: Prisma 4.13.0


Note: A replacement for this library is under development and available in early preview. More details in #1039. Since the Prisma team is no longer keeping this library up to date with new Prisma versions, we have forked it.

This plugin integrates Prisma into Nexus. It gives you an API you to project fields from models defined in your Prisma schema into your GraphQL API. It also gives you an API to build GraphQL root fields that allow your API clients to query and mutate data.

You can find the documentation on the Nexus website.

Note2: This package is a fork from kenchi's. Thank you for your support pre-prisma 4.0.

Usage notes

AWS Lambda packaging

Make sure to include @prisma/internals in your AWS Lambda packaged node_modules folder, in addition to the @prisma/client package.

To mitigate overall package size issues, remove all libquery_engine-debian-openssl-1.1.x.so.node files under node_modules/@prisma as they are not leveraged by AWS Lambda.

Installation

npm install @morgothulhu/nexus-plugin-prisma
# OR
yarn add @morgothulhu/nexus-plugin-prisma

Package management

Build, test

build

yarn
yarn build

test

yarn test

If tests need snapshot updates, run yarn test:run:rebaseSnapshots

Dependencies versioning

update all packages

yarn update:all

Windows pre-requisites

Install SQLite3

(follow instructions from here)

Interactive test run

Windows 32 (as an example)

.\node_modules\.bin\jest --forceExit --verbose=true --useStderr=true --silent=false -t "supports nested query with one id field" --watch

.\node_modules\.bin\jest --forceExit --verbose=true --useStderr=true --silent=false --watch ./tests/app.test.ts

validate sqlite install

[System.Environment]::SetEnvironmentVariable("DEBUG", "*")
cls ; .\node_modules\.bin\jest --forceExit --verbose --useStderr -t "supports custom resolver for t.crud" custom-

nexus-plugin-prisma's People

Contributors

weakky avatar jasonkuhrt avatar renovate-bot avatar morgothulhu avatar renovate[bot] avatar nikolasburk avatar schickling avatar bkrausz avatar dependabot[bot] avatar brannon-darby avatar lvauvillier avatar jangerhofer avatar janpio avatar mipyykko avatar matart15 avatar tgriesser avatar ahmedelywa avatar nlko avatar wbhob avatar williamluke4 avatar tomchv avatar timsuchanek avatar gomah avatar chenkie avatar p4sca1 avatar nhuesmann avatar smona avatar macrozone avatar lukewlms avatar steebchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.