I have a graphene query that looks similar to below where I have more than 1 resolver function. These queries run sequentially per the Django debug toolbar. Even though these queries are not dependent on each-other. I've been digging through the Graphene repo and stackoverflow for how to handle vanilla query resolvers asynchronously to no avail. It seems there are ways to tackle subscriptions(ie websockets). But currently my only concern is queries. I'm not sure which libraries I may need or how to configure this.
class MyQuery(ObjectType):
test_one = graphene.Field(TestNode)
test_two = graphene.Field(TestNode)
def resolve_test_one(self, info, **args):
return MyTestModel.objects.get(id="id-1")
def resolve_test_two(self, info, **args):
return MyTestModel.objects.get(id="id-2")