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
The UnsortedSQLAlchemyConnectionField.resolve_connection function throws the following error when it tries to resolve relationship fields that are Sets instead of lists (defined using SQLAlchemy's "collection_class=set" on the relationship).
ERROR: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/promise/promise.py", line 87, in try_catch
return (handler(*args, **kwargs), None)
File "/usr/local/lib/python3.8/site-packages/graphene_sqlalchemy/fields.py", line 56, in resolve_connection
connection = connection_from_list_slice(
File "/usr/local/lib/python3.8/site-packages/graphql_relay/connection/arrayconnection.py", line 79, in connection_from_list_slice
_slice = list_slice[
graphql.error.located_error.GraphQLLocatedError: 'InstrumentedSet' object is not subscriptable
This can be worked around for fields in the GraphQL model classes by adding a resolver function that converts the sets to lists, but nested filtered connection fields use the UnsortedSQLAlchemyConnectionField.resolve_connection function by default, which doesn't seem to be easy to override.
The text was updated successfully, but these errors were encountered:
The UnsortedSQLAlchemyConnectionField.resolve_connection function throws the following error when it tries to resolve relationship fields that are Sets instead of lists (defined using SQLAlchemy's "collection_class=set" on the relationship).
This can be worked around for fields in the GraphQL model classes by adding a resolver function that converts the sets to lists, but nested filtered connection fields use the UnsortedSQLAlchemyConnectionField.resolve_connection function by default, which doesn't seem to be easy to override.
The text was updated successfully, but these errors were encountered: