paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
680 stars 55 forks source link

Prisma4 jest pnpm #284

Closed AhmedElywa closed 1 year ago

AhmedElywa commented 1 year ago

Re-build our project.

[docs] need to update

[breaking changes]: we have a lot of breaking changes

 // send custom dmmf if you have custom generated client path for generate input types
  dmmf?: DMMF.Document[];
  // take an array of field names to exclude from any input type
  excludeFields?: string[];
  // take a function and the input object as arg and return array of fields you want to generate
  filterInputs?: (input: DMMF.InputType) => DMMF.SchemaArg[];
  // by default when we create update inputs you will set data like {username: {set: "Ahmed"}} by making this option true you will be able to use it like {username: "Ahmed"} without set.
  // but you will also lose these options for number 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 })
  doNotUseFieldUpdateOperationsInput?: boolean;

We added them to pal.config.js

excludeInputFields?: string[];
filterInputs?: (input: DMMF.InputType) => DMMF.SchemaArg[];

... will add more later

AhmedElywa commented 1 year ago

@YassinEldeeb, can you do a review

YassinEldeeb commented 1 year ago

That's pretty interesting, definitely wanna review it tomorrow's morning

ManuelTeranCampi commented 1 year ago

Estoy trabajando en windows y obtengo este error :( Captura de pantalla (95)

AhmedElywa commented 1 year ago

Estoy trabajando en windows y obtengo este error :( Captura de pantalla (95)

The fix in this issue #248

ManuelTeranCampi commented 1 year ago

Captura-de-pantalla-(96)

when I add (fullTextSearch) in the prisma schema if it generates the types but it gives me a server error and it doesn't show me the data could you help me thanks

AhmedElywa commented 1 year ago

Captura-de-pantalla-(96)

when I add (fullTextSearch) in the prisma schema if it generates the types but it gives me a server error and it doesn't show me the data could you help me thanks

Please open new issue with that error And be note that we never test with the preview features so I think you need to find the bug yourself or wait until we find it and fix it

thanks

ManuelTeranCampi commented 1 year ago

Thank you !!

El sáb, 26 nov 2022 a las 12:10, Ahmed Elywa @.***>) escribió:

[image: Captura-de-pantalla-(96)] https://user-images.githubusercontent.com/67123054/204099425-2ad4771e-99d8-4530-8dbf-11380485ccef.png

when I add (fullTextSearch) in the prisma schema if it generates the types but it gives me a server error and it doesn't show me the data could you help me thanks

Please open new issue with that error And be note that we never test with the preview features so I think you need to find the bug yourself or wait until we find it and fix it

thanks

— Reply to this email directly, view it on GitHub https://github.com/paljs/prisma-tools/pull/284#issuecomment-1328081938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQADO3QVU2SOZ26NH754LV3WKJAAHANCNFSM6AAAAAARWJ7KY4 . You are receiving this because you commented.Message ID: @.***>