Git Product home page Git Product logo

Comments (2)

hayes avatar hayes commented on September 3, 2024 1

We might be able to add that as a setting., but this is intentional.

Pothos v4 made changes so that you will now see type-errors if you try to make a nullable field in your db non-nullable in the GraphQL.

Pothos is designed to never rely on the shape of your data to determine the shape of the GraphQL schema. This means that a change in your DB (or other data) should never automatically change the GraphQL schema. This abstraction is critical for making it manageable to maintain large APIs and has worked out really well in the projects I've worked on. It does require adding some extra definitions for which fields are nullable, but to me this is a worthwhile tradeoff.

But, if it seems worth it to you, we could add a setting to the builder that enables mirroring the Schemas nullability

from pothos.

vimutti77 avatar vimutti77 commented on September 3, 2024

The setting to enable mirroring the schema’s nullability would be perfectly helpful for me. I’m eager to see this feature come to fruition, and I’m available to assist if needed!

from pothos.

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.