multiple node type in a list
See original GitHub issueI have googled around to no avail, is it possible to have a graphene list that has multiple types? I have a model with a property that returns a list of 2 related sets like so:
@memoized_property
def assets(self):
return list(
chain(self.fileasset_set.all(), self.questionasset_set.all())
)
how can I describe that properly using graphene? Is it possible to dynamically deduce what kind of Node during runtime? I want to be able to express, for example or something close to:
assets {
edges {
node {
...FileAsset {
uploader
}
...QuestionAsset {
author
}
}
}
}
any way to do this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Multiple different data types in a Node for a custom linked list ...
Save this question. Show activity on this post. I am trying to build a linked list, and each node will have one integer,...
Read more >Adding a Node to a List - Cloud - Oracle Help Center
Bottom Nodes: Add only the bottom nodes of the selected or dragged node. Note: If multiple node types are available, you're prompted to...
Read more >Get all nodes of given type - Drupal Answers - Stack Exchange
I know I can get all the nodes (of any type) with \Drupal\node\Entity\Node::loadMultiple() and the list of all types by \Drupal\node\Entity\NodeType:: ...
Read more >Amazon Redshift clusters - AWS Documentation
On a multi-node cluster, the leader node is separate from the compute nodes. The leader node is the same node type as the...
Read more >Node | Elasticsearch Guide [8.5] | Elastic
This means that a node that has an explicit empty list of roles via node.roles will ... You can run multiple Elasticsearch nodes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your field needs to return a union type. These aren’t currently documented as far as I can see, which is a bit odd, I thought they used to be. Anyway, the code looks like this:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.