3 ms·
Graphene is a more pythonic wrapper ontop of a lower-level library called graphql-core[1], which provides async execution using execution middlewares [2]. As f
by jhgg 11y ago
Graphene is a more pythonic wrapper ontop of a lower-level library called graphql-core[1], which provides async execution using execution middlewares [2].
As far as how a data-loader is implemented, I have a few experiments doing it with gevent, but nothing prod ready. Essentially you can just use the `loop.run_callback` function to get the "next tick" semantics. I combined this along with gevent's AsyncResult to provide a pythonic coroutine based implementation of FB's datawrapper.
[1] https://github.com/graphql-python/graphql-core
[2] https://github.com/graphql-python/graphql-core/tree/master/graphql/core/execution/middlewares