Skip to content

Commit

Permalink
feat: add support for nexus-plugin-prisma-fork
Browse files Browse the repository at this point in the history
BREAKING CHANGE: resulting dialect of the dataprovider is slightly different from the one of nexus-plugin-prisma, so its no longer compatible with the old version

its unclear whether it breaks type-graphql support
  • Loading branch information
macrozone committed Nov 8, 2023
1 parent dce98b1 commit a74633a
Show file tree
Hide file tree
Showing 31 changed files with 10,621 additions and 6,634 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"private": true,
"devDependencies": {
"@babel/core": "^7.15.8",
"@morgothulhu/nexus-plugin-prisma": "^5.5.2",
"@babel/plugin-proposal-decorators": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"@babel/preset-typescript": "^7.15.0",
"@prisma/client": "^3.15.2",
"@prisma/client": "^5.5.2",
"@types/jest": "^27.0.2",
"@types/lodash": "^4.14.171",
"@types/node": "^13.13.4",
Expand All @@ -31,7 +32,6 @@
"lint-staged": ">=10",
"lodash": "^4.17.15",
"nexus": "^1.0.0",
"nexus-plugin-prisma": "^0.35.0",
"path": "^0.12.7",
"plain-tag": "^0.1.3",
"pluralize": "~7.0.0",
Expand All @@ -45,7 +45,7 @@
"semantic-release-monorepo": "^7.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^8.9.1",
"typescript": "^4.4.3"
"typescript": "^5.2.2"
},
"scripts": {
"clean": "lerna run clean --stream --parallel",
Expand Down
5 changes: 3 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
"pluralize": "^7.0.0"
},
"peerDependencies": {
"nexus": ">=1.0.0"
"nexus": ">=1.0.0",
"@morgothulhu/nexus-plugin-prisma": "*"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^4.4.3"
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/backend/src/addCrudResolvers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ResourceOptions, CommonOptions } from "./types";
import setupCrudResolvers from "./setupCrudResolvers";
import { extendType, arg, intArg } from "nexus";
import * as Helpers from "nexus-plugin-prisma/src/typegen/helpers";
import * as Helpers from "@morgothulhu/nexus-plugin-prisma/src/typegen/helpers";

const addCrudResolvers = <
AliasPrefix extends string,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/setupCrudResolvers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { upperFirst, lowerFirst } from "lodash";
import * as Helpers from "nexus-plugin-prisma/src/typegen/helpers";
import * as Helpers from "@morgothulhu/nexus-plugin-prisma/src/typegen/helpers";

import pluralize from "pluralize";
import { ResourceOptions, CommonOptions } from "./types";
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Helpers from "nexus-plugin-prisma/src/typegen/helpers";
import { BaseRelationOptions } from "nexus-plugin-prisma/typegen";
import * as Helpers from "@morgothulhu/nexus-plugin-prisma/src/typegen/helpers";
import { BaseRelationOptions } from "@morgothulhu/nexus-plugin-prisma/typegen";

type Prefix<What extends string, Prefix extends string> = Prefix extends ``
? Uncapitalize<What>
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ rimraf@^3.0.2:
dependencies:
glob "^7.1.3"

typescript@^4.4.3:
version "4.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==
typescript@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

wrappy@1:
version "1.0.2"
Expand Down
1 change: 1 addition & 0 deletions packages/dataprovider/.prisma/edge.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './index'
276 changes: 276 additions & 0 deletions packages/dataprovider/.prisma/edge.js

Large diffs are not rendered by default.

Loading

0 comments on commit a74633a

Please sign in to comment.