Comments (11)
Yes, there is one option to do this.
in your pal.js
file, you can add this
example
module.exports = {
backend: {
generator: 'nexus',
excludeModels: [{ name: "User", queries: true, mutations: true }];
},
};
from prisma-tools.
how about for all models?
from prisma-tools.
Here are all options https://paljs.com/generator#options-type-definition
module.exports = {
backend: {
generator: 'nexus',
disableQueries: true,
disableMutations: true,
},
};
from prisma-tools.
Here are all options https://paljs.com/generator#options-type-definition
module.exports = { backend: { generator: 'nexus', disableQueries: true, disableMutations: true, }, };
did exactly this and still generating both
from prisma-tools.
If you already have any file generated our CLI will not remove it.
from prisma-tools.
Here's the step that I did:
module.exports = {
backend: {
generator: "nexus",
output: "src/graphql/models",
disableQueries: true,
disableMutations: true,
},
};
from prisma-tools.
Yes found it will fix and push new version
from prisma-tools.
Please upgrade to the last version 2.5.5 and will get a fix for this issue
from prisma-tools.
Hmm, still having the exact same issue.. setting only disableQueries or disableMutations still generating both..
the excludeModels: [{name: "Doctor", queries: true, mutations: true}]
works tho
pal.js
module.exports = {
backend: {
generator: "nexus",
output: "src/graphql/models",
disableQueries: true,
disableMutations: true,
excludeModels: [{name: "Doctor", queries: true, mutations: true}],
},
};
package.json
...
"dependencies": {
"@nexus/schema": "^0.17.0",
"@paljs/cli": "^2.5.5",
"@paljs/nexus": "^2.5.4",
"@paljs/plugins": "^2.5.4",
"@prisma/client": "2.10.1",
"apollo-server-express": "^2.19.0",
"axios": "^0.21.0",
"bcrypt": "^5.0.0",
"cross-env": "^7.0.2",
"dotenv-flow": "^3.2.0",
"express": "^4.17.1",
"glob": "^7.1.6",
"graphql": "^15.4.0",
"graphql-request": "^3.3.0",
"graphql-scalars": "^1.4.1",
"graphql-tag": "^2.11.0",
"jsonwebtoken": "^8.5.1",
"link-module-alias": "^1.2.0",
"moment": "^2.29.1",
"nexus-plugin-prisma": "^0.23.1",
"node-gcm": "^1.0.3",
"nodemailer": "^6.4.14",
"prisma-dbml-generator": "^0.3.1",
"uuid": "^8.3.1",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.0",
"zod": "^1.11.10"
},
...
from prisma-tools.
I just tested it 2.5.4 have issue 2.5.5 working good.
Please be sure you delete the folder and rerun it.
I can go online with you. If this does not work, please give it another try.
from prisma-tools.
yeah, still having the issue.. how can I contact you? I dm'ed you via twitter..
from prisma-tools.
Related Issues (20)
- sdlInputs on v5.0.0 onwards HOT 5
- Question: transform outputs from pal g for SDL first
- API EN LOCALHOST FUNCIONA BIEN PERO CUANDO LO SUBO A VERCEL ME DA ERROR DE SERVIDOR NO ME MUESTRA LOS DATOS DE MI BASE DE DATOS
- DeleteOneArgs where field should not be nullable HOT 1
- How to add to an existing project? HOT 1
- pal g only works if the prisma.schema file is saved as LF (linux default) HOT 1
- pal camel-case does not convert enums to camelCase HOT 1
- Support Prisma 5.0.0 version HOT 6
- `__typename` not returned in select HOT 2
- TypeError: Cannot read properties of undefined (reading 'includes')
- Error: pal config file is not found HOT 1
- PrismaSelect - `Record<string, unknown> ` instead of `any`
- [sdl generator] Error when model name is in lower case HOT 1
- Convert to Camel case breaks when tables start with same name
- problems using arguments in a subquery
- _count doesn't accept arguments
- Aggregate resolver return type is wrong
- Utils has some Typescript errors
- Test in utils fails on Windows
- VS Code settings should include PNPM as the package manager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma-tools.