question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Using Graphene Django with Polymorphic (typed models)

See original GitHub issue

I am trying to query a field source on a model called Requirement which can have a source which is a pool however pool is polymorphic. That is, it is a typed model.

Pool(TypedModel):
   ...

ManufacturedLabwarePool(Pool):
  ...

When I try to query source as a field on Requirement I get the following error:

image

I’m not sure how to resolve this so that we do not expect a specific type for a given field.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Django & Graphene: How to handle bidirectional relationship ...
graphene -django doesn't recognize the relationship, but declaring and resolving ... registry from . import models class EventType(graphene.
Read more >
Queries & ObjectTypes - Graphene-Python
By default, DjangoObjectType will present all fields on a Model through GraphQL. If you only want a subset of fields to be present,...
Read more >
Graphql cannot query field on type - Para Erboristeria Ruocco
When we query or mutate data using our GraphQL schema, we first have to ... And I used the same versions of Django,...
Read more >
GraphQL Implementation in Django| Graphene Tutorial
We will use the graphene library, which works with GraphQL and Python. ... class to create the GraphQL types for each of our...
Read more >
[Solved]-Does graphene-django dynamically create an API ...
[Solved]-Does graphene-django dynamically create an API documentation?-django ... Yes, it's very easy to do by using GraphiQL, which is embedded in to Graphene....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found