Replies: 1 comment
-
@y-nosa sorry for the late reply, have you seen strawberry.Private? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Despite the fact there is no official support/integration of Sqlalchemy for Strawberry, I've been using strawberry with sqlalchemy for some time with success.
Strawberry works well with SqlAlchemy 2.0 when entities are modelled as data classes.
Recently I stumbled upon a specific case related to mapping the hierarchy of classes. Applying strawberry.type annotation breaks Sqlalchemy query generation when an additional field for polymorphic inference is mapped in Sqlalchemy.
With this additional mapping, sqlalchemy put additional semantics to the type field to determine the identity.
Without digging into the details of the implementation for both Strawberry and SqlAlchemy, I thought that workaround would be to exclude this field from strawberry serialization. Nonetheless, cannot find any annotation for doing that.
Can you please point me out, if such an option is available?
Beta Was this translation helpful? Give feedback.
All reactions