Comments (2)
Hey @furious-luke ,
I've done a bit of digging around and it appears that the Django GraphQL field resolvers aren't converting Django models to Strawberry types (please correct me if I'm wrong).
You are correct! This is actually the behaviour from the official strawberry-graphql-django, and from all other integrations (e.g. pydantic) if I'm not mistaken.
What probably needs to be done here is to somewhat map the model to the type itself so that the interface gets resolved correctly.
Could you provide a minimal runnable example that I can use for testing? With that I might be able to solve this issue.
from strawberry-django-plus.
@furious-luke I think I fixed this issue in the latest release here. Going to close the issue, but please reopen it if that's not the case
from strawberry-django-plus.
Related Issues (20)
- FieldError when using select_related with enable_only_optimization HOT 4
- matching query does not exist error when relational field does not exist HOT 1
- Query optimization based on type hints for non-model fields? HOT 4
- Prefetch related selects all the fields on the model instead of the ones specified in the gql query HOT 2
- Cursor Pagination without relay HOT 2
- HasObjPerm directive on a update mutation fails updating the cache, due to unhashable type OperationInfo HOT 7
- Optimizer causes duplicate query when filtering or paginating a related field HOT 11
- Non-obvious moments when overloading the Connection HOT 1
- InputMutation / Mutation not working with List return type HOT 3
- [Error] "children" lookup was already seen with a different queryset. You may need to adjust the ordering of your lookups. HOT 1
- auto creation of translated fields HOT 5
- pk required for mutations when handle_django_errors=False HOT 1
- [ERROR] Error in the project `default`: Invalid use of @refetchable on fragment HOT 3
- Update mutation fails with List HOT 4
- Non functional filters for django with relay. HOT 1
- precommit broken - isort version needs to be bumped HOT 1
- How to have custom ordering method on gql.django.ordering.order class definition HOT 6
- Batch create mutation
- Async relay connection error on count() HOT 2
- enum validation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strawberry-django-plus.