Skip to content
Discussion options

You must be logged in to vote

Hi @jkepps , thanks for bringing up this interesting use case.

TLDR; we currently don't have a way to change types based on custom directives (with some exceptions).

For scenario 1, I'm curious if you'd do a check in your server to handle null before passing it on to the ORM?

Enforcing input type may work for one client, but there are some scenarios to consider:

  • if the list of your client grows, each client needs to set up the same codegen config.
  • a random client may still send null. So it still may be safer for the server to handle null anyways. To me, this would be the best practice

Scenario 2 seems like the typical nullability use case 👍


If a direct configuration for this doesn't e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jkepps
Comment options

Answer selected by jkepps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants