Skip to content

Recommended workflow for omitting excess input properties #242

Answered by kitten
kasper573 asked this question in Q&A
Discussion options

You must be logged in to vote

The extended answer here to narrow it down is that we don't and won't generate any runtime code: #263 (comment)

That's not a specific goal of the project.
This is basically a problem with all API inputs, and you could also pre-filter arguments on the server-side and instead warn about this if you're concerned about accidentally failing your requests due to smaller changes in the state.

However, I'd say, given the TypeScript constraint here that exact record types aren't possible, it's not too much trouble to map over inputs just before you send them off as a mutation. IMHO, from a perspective of writing out a couple of properties it isn't too bad.

If this does get more you could consider …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@kasper573
Comment options

@kitten
Comment options

Answer selected by kitten
@kasper573
Comment options

Comment options

You must be logged in to vote
0 replies
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