Skip to content

Support for AsyncIterable resolvers #123

Closed
@Jamie-Chang

Description

@Jamie-Chang

Currently async resolvers for arrays are async functions that return an iterable.

There seem to be a lack for support for resolvers that return an AsyncIterable. For example, using motor to query a mongo collection:

async def resolve_users(*_):
    async for document in collection.find({}):
        yield document

Of course, a work around would be to fetch all documents first, but supporting the async iterator / generator would be a much nicer way to do it.

Metadata

Metadata

Assignees

Labels

featureFeature request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions