Skip to content

Schedule batch loading #7

Closed
Closed
@LarsJK

Description

@LarsJK

I've been trying to come up with a way to schedule the batch loading like graphql/dataloader does with node.js process.onTick. But I can't really find a way since swift is multithreaded and I can't find any onTick.

Have you tried using this on a GraphQL server? When/where do you call try userLoader.dispatchQueue(on: req.eventLoop)? Was thinking I maybe need some kind of middleware to run after all the resolvers..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions