Comments (4)
Thanks for info!
and yes if there could be some kind of flag in the paljs config that we could use together with generator:'sdl'
so that sdlInputs()
will not choose the types that require set
and it'll be more "prisma1-friendly"
I guess it could look something like the following?
// pal.js config
module.exports = {
backend: {
generator: 'sdl',
output: 'gql/src/typedefs',
doNotuseFieldUpdateOperationsInput: true // defaults to false. This is just a suggestion. I'm not sure what would be a good name or a good place to indicate this flag
};
Will probably have to indicate in the documentation that this will not generate graphql type defs that support prisma2.6 and above.
from prisma-tools.
Why we use Object
not string
type?
Because the Number
fields have many options like:
from prisma release notes https://github.com/prisma/prisma/releases/tag/2.6.0
We are introducing five atomic operations for Int and Float fields :
increment
: x: Adds x to the current value
decrement
: x: Subtracts x from the current value
multiply
: x: Multiplies the current value by x
divide
: x: Divides the current value by x
set
: x: Sets the value to x (equivalent to data: { age: 18 })
And Also for Json fields must with set
In the end, I can add an option for you to pass into SDLInputs()
function
from prisma-tools.
Can you tell me if you using my generator with Javascript
or Typescript
?
from prisma-tools.
Can you tell me if you using my generator with
Javascript
orTypescript
?
we are using typescript 👍🏻
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.