You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have SQLAlchemyConnectionField in top-level query, like in the example it works perfectly.
But if I have Query -> Viewer -> SomeObject -> PetConnection -> Pet
sort won't work.
In case of top level query UnsortedSQLAlchemyConnectionField.get_query is called, which injects sorting.
In case of nested object connection resolve - gettattr already takes model object (SomeObject) with
Pets array populated from the db. So getattr just takes these pet without any ordering.
Workaround here is to have custom resolver, but it would be much better to fix it on library level.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello @comtihon, have you been able to work out a custom solution? I'm having this same problem and I still can not think of something generic for the models.
When I have SQLAlchemyConnectionField in top-level query, like in the example it works perfectly.
But if I have
Query -> Viewer -> SomeObject -> PetConnection -> Pet
sort won't work.
In case of top level query
UnsortedSQLAlchemyConnectionField.get_query
is called, which injects sorting.In case of nested object connection resolve - gettattr already takes model object (SomeObject) with
Pets array populated from the db. So getattr just takes these pet without any ordering.
Workaround here is to have custom resolver, but it would be much better to fix it on library level.
Thanks!
The text was updated successfully, but these errors were encountered: