-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
No way to resolve type of non-strawberry types returned for an interface #1405
Comments
I was wrong about the graceful failure on If I understand correctly, it seems that Should strawberry require explicit type resolution for duck-typed objects? |
Not sure why this closed... |
I think this was fixed by #1406 (at least that was intended to fix this) |
This comment is correct:
strawberry/strawberry/schema/schema_converter.py
Lines 235 to 244 in feb6ede
It's correctly reflected in the docs, but still does pose a pretty bad limitation for implementations that resolve to non-strawberry types.
The following test fails (using a similar example to #1150):
In
graphene
, the converter allows you to defineis_type_of
classmethods on concrete types or aresolve_type
classmethod on the interface. I think the equivalent within strawberry would be to optionally includeis_type_of
here, and to gracefully fail type resolution for non-strawberry objects (by returningNone
) withinresolve_type
.Upvote & Fund
The text was updated successfully, but these errors were encountered: