-
Notifications
You must be signed in to change notification settings - Fork 44
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
how to pass in a json data struct? #101
Comments
Thanks for your question! It looks like above you are creating Without seeing more of your code, I'm finding it hard to give advice. Can you show where you're overriding |
Thanks for your reply. I have a interface definition like this:
and a generic query endpoint
So now back to the Rest... adapted from my previous post
The query that works is
What is not working is the following query:
One issue is that the GrapheneModel is_of_type from the PydanticGraphene base class is not hitting.
Then the right Model (GrapheneModel) gets hit but the resulting values are "null". I hope this makes it more clear ;) |
I have the following challenge:
I am getting data from a database in json format / as dict.
This works great when I am directly grabbing the data in the query and "upgrading" it to the defined and in meta class registered pedantic data model.
Example:
But I also have other cases where I come through an interface.
I can overlay the is_type_of method to get to the right
GrapheneModel
, but the data that comes in is then a dict, which does not work... Do you guys have an idea how the data can be upgraded within the Graphene Model?I cannot do it in the interface as I do not know the type there...
Thanks for any advise.
The text was updated successfully, but these errors were encountered: