-
Notifications
You must be signed in to change notification settings - Fork 47
Update mutation fails with List #169
Comments
Since you are not using relay, you can't use Try to remove the |
Thanks for the quick reply! I did some debugging and I think the issue might be in parse_input or _parse_data in strawberry_django_plus/mutations/resolvers.py. They seem to expect to find a ParsedObject or a OneToOneInput, OneToManyInput, etc. I can't find the place where the input string gets parsed into one of these types. The mutation will run without errors if I change my input type to this:
Here is my model:
However, if I try to create a Rating with this query: I get this error:
So if the field is nested, I must use ID, but if it is at the root, then ID is not accepted. This inconsistency is very confusing! |
I have to admit that I didn't fully test the input mutations with non relay types. Can you provide a minimal reproduction example so that I can try to fix it? |
Here you go! |
When I try to run an update mutation with a List, I get this error:
Cannot assign "'1'": "Rating.goal" must be a "Goal" instance."
Here is the mutation:
And the relevant parts of my schema:
Am I doing something wrong or is this a bug?
The text was updated successfully, but these errors were encountered: