morgothulhu / nexus-plugin-prisma Goto Github PK
View Code? Open in Web Editor NEWThis project forked from graphql-nexus/nexus-plugin-prisma
A plugin for Nexus that integrates Prisma
Home Page: http://nxs.li/plugins/prisma
License: MIT License
This project forked from graphql-nexus/nexus-plugin-prisma
A plugin for Nexus that integrates Prisma
Home Page: http://nxs.li/plugins/prisma
License: MIT License
Add @prisma/internals from devDependencies to dependencies
Error: "Cannot find module '@prisma/internals'\nRequire stack:\n- /private/var/folders/gc/kk64y5156mv3t_m45my46_t80000gn/T/tmp1667541690397_20ba02cb-d58d-4ada-abec-24054d06742d.js"
at /path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/utilsSync.ts:73:24
at transform (/path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/dmmf/transformer.ts:92:32)
at getTransformedDmmf (/path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/dmmf/transformer.ts:31:5)
at new SchemaBuilder (/path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/builder.ts:250:25)
at build (/path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/builder.ts:168:19)
at Object.onInstall (/path-to-monorepo/node_modules/@morgothulhu/nexus-plugin-prisma/src/plugin.ts:46:83)
at /path-to-monorepo/node_modules/nexus/src/builder.ts:650:44
at Array.forEach (<anonymous>)
at SchemaBuilder.beforeWalkTypes (/path-to-monorepo/node_modules/nexus/src/builder.ts:643:18)
at SchemaBuilder.getFinalTypeMap (/path-to-monorepo/node_modules/nexus/src/builder.ts:802:10
Hi, first of all, thank you for maintaining this fork even when the original is deprecated.
This is not an issue rather a question, I'm upgrading prisma from 3.x to 5.1.0 and using t.crud is generating new types instead of the old ones which is a breaking change in our graphql schema.
If a model MyModel
have a nullable field x
, then if I do t.crud.mymodel({ ordering : { x: true } })
then, the generated input in my schema.graphql is input QueryMyModelOrderByInput { x: SortOrderInput }
previously, the generated type in [email protected] using an older version of nexus-plugin-prisma will generate input QueryModelOrderByInput { x: SortOrderInput }
which I know is fine since SortOrderInput
is an improvement but, in my case, for my current existing graphql schema is a breaking change since it will affect the frontend (cached versions especifically).
Given this context, my question is: do you know how can I keep backwards compatibility by using like SortOrderInput | SortOrder
when using this library? The workaround I realized is by manually overwriting the generated schema and/or creating another query like a v2.
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.