Skip to content

Input type fields on input types don't seem to be updated after initialization #199

Answered by barbieri
madiganz asked this question in Q&A
Discussion options

You must be logged in to vote

In your examples, please note that ("name") is the same as "name" (a string, not a tuple). You should use a tuple, then you need a trailing , as in ("name",).

The input types are meant to be used as a single, immutable construction as they will get the fields and convert to the GraphQL format, it's a difficult task to wrap every mutable type, so it's not done. In your second example test.field2 is a simple list type, and mutating it won't update the GraphQL-converted data structure (it's only done in the constructor).

It's possible to be added, but an effort I can't do right now (patches are welcome 😀)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@madiganz
Comment options

@barbieri
Comment options

@madiganz
Comment options

@barbieri
Comment options

@madiganz
Comment options

Answer selected by madiganz
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