-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When mutation takes a list as an argument - passing in a list of the type does not work #53
Comments
Great! I just wanted to make sure I wasn't doing something wrong. I'll see about if I can address. |
Passing explicit input objects should work, but seems it is not working as expected to create them. However it would be super-handy to allow plain Python objects to be used -- after all the GraphQL input types are as simple and we could convert easily. So I'd suggest:
|
could you confirm b1c740c fixed it? |
note: https://github.com/profusion/sgqlc/releases/tag/v8.0 and uploaded to pypi! it should include this fix, let me know if solves this issue |
Thank you!! |
I have an input type that takes a list as an argument. I haven't seen an example of this use case so I just guessed that I could pass in a python list of the right type. But I get the following error:
AttributeError: 'MyInput' object has no attribute 'items'
And, in fact, it is expecting a dict. Here's an edited version of the code I use to run the mutation:
I'm assuming that passing a simple list into the argument is not the right way to go about it, but I'm not sure how to construct the list otherwise.
Thoughts?
The text was updated successfully, but these errors were encountered: