Thanks for the library! I'm trying to update an application to a current set of GraphQL libraries and this one could be helpful in that effort.
I ran into a problem trying to use it with a resolver function that returns an iterable value, but the value doesn't have __len__. In my case, it is a SQLAlchemy Query object, though a simple generator ought to behave similarly.
Thanks for the library! I'm trying to update an application to a current set of GraphQL libraries and this one could be helpful in that effort.
I ran into a problem trying to use it with a resolver function that returns an iterable value, but the value doesn't have
__len__
. In my case, it is a SQLAlchemy Query object, though a simple generator ought to behave similarly.The trouble comes at this line:
Which raises an exception for the type not having len(). The check earlier in the function for
is_iterable(result)
passes fine.