GithubHelp home page GithubHelp logo

Comments (12)

NazarenoCavazzon avatar NazarenoCavazzon commented on May 28, 2024 1

Niiiceeee

from prisma-dart.

medz avatar medz commented on May 28, 2024

#84

from prisma-dart.

medz avatar medz commented on May 28, 2024

@NazarenoCavazzon The feat released in 2.5.0 version

from prisma-dart.

NazarenoCavazzon avatar NazarenoCavazzon commented on May 28, 2024

Nice!

from prisma-dart.

NazarenoCavazzon avatar NazarenoCavazzon commented on May 28, 2024

@medz the idea behind this was to be able to generate also the DTOs for the clases we have in the prisma schema, so that way it saves us a lot of time writing those.

from prisma-dart.

medz avatar medz commented on May 28, 2024

@medz the idea behind this was to be able to generate also the DTOs for the clases we have in the prisma schema, so that way it saves us a lot of time writing those.

@NazarenoCavazzon Yep, for RESTful server and GraphQL server, supporting the direct creation of input from JSON map can reduce a lot of unnecessary template code, thereby reducing the mental burden of developers.

from prisma-dart.

medz avatar medz commented on May 28, 2024

@NazarenoCavazzon I'm personally dissatisfied with the current JSON serialization and deserialization, the mental model for writing input/outout classes is too big for me. This problem comes from json_serializable, I originally planned to get rid of it in 2.5.0, but freezed and crimson serialization support is not perfect, especially freezed toJson still relies on json_serializable.

Since I can't get rid of json_serializable, I think I'll wait until Dart 3 to try macros to get rid of json_serializable.

from prisma-dart.

NazarenoCavazzon avatar NazarenoCavazzon commented on May 28, 2024

@medz Seems reasonable, dart right now gives a lot of problems with this.

from prisma-dart.

NazarenoCavazzon avatar NazarenoCavazzon commented on May 28, 2024

@medz I'm testing Spry, overall looks amazing!, and looking at the documentation I found a typo.

image

The variable is named spray, not spry, also I found many spaces after a dot, could it be the translator?

from prisma-dart.

medz avatar medz commented on May 28, 2024

@medz I'm testing Spry, overall looks amazing!, and looking at the documentation I found a typo.

image

The variable is named spray, not spry, also I found many spaces after a dot, could it be the translator?

It should be caused by the format tool, I will recheck the documentation and fix it, also welcome to submit a PR

The grammatical error should be caused by me, because my English writing ability is relatively poor.

from prisma-dart.

medz avatar medz commented on May 28, 2024

@NazarenoCavazzon There is no serialization support for union in 2.5.*, which will cause normal dart run build_runner build to fail, I will reopen this issue. Then mark the 2.5. version as unavailable. Fixing this requires removing the built-in PrismaUnion and introducing the freezed package, after which I will release version 2.6.0.

from prisma-dart.

medz avatar medz commented on May 28, 2024

Now, I released version 2.6.0 to fix the unsupported union serialization in 2.5.*. This version has changed a lot and supports the complete Prisma input requirements (the previous version will selectively choose the largest input parameter type). The formJson method is also fully supported now.

I will mark the 2.5.* version as unavailable later to avoid the wrong use of the 2.5.* unavailable version, which will cause the program to always fail to run.

from prisma-dart.

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.