graphql-sync-dataloaders
graphql-sync-dataloaders copied to clipboard
fix: future
I'm not related to author of the PR, but we noticed the following error due to this issue:
NameError: free variable 'future' referenced before assignment in enclosing scope
File "graphql_sync_dataloaders/execution_context.py", line 156, in process_completed
future.set_result(completed.result())
File "graphql_sync_dataloaders/sync_future.py", line 53, in set_result
self._finish()
File "graphql_sync_dataloaders/sync_future.py", line 73, in _finish
callback(self._result)
File "graphql_sync_dataloaders/execution_context.py", line 100, in process_result
future.set_result(results)
free variable 'future' referenced before assignment in enclosing scope
We've created a fork of this repo with the above fix if you're interested: https://github.com/loft-orbital/graphql-sync-dataloaders/tree/loft-main
We've been running dataloaders in productions for a few weeks now without any significant issues, we're planning on pushing a PR on graphene-django
to support them automatically