Giter Site home page Giter Site logo

Comments (4)

pakatagoh avatar pakatagoh commented on May 18, 2024 2

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 setand 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.

AhmedElywa avatar AhmedElywa commented on May 18, 2024 1

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.

AhmedElywa avatar AhmedElywa commented on May 18, 2024

Can you tell me if you using my generator with Javascript or Typescript?

from prisma-tools.

pakatagoh avatar pakatagoh commented on May 18, 2024

Can you tell me if you using my generator with Javascript or Typescript?

we are using typescript 👍🏻

from prisma-tools.

Related Issues (20)

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.