Skip to content

Allow returning arbitrary valuesΒ #14

@jacob-israel-turner

Description

@jacob-israel-turner

We're looking at using this library to wrap a portion of our existing data loader implementation. A headache that has come up is that redis-dataloader does not allow returning primitives, only JSON. This makes consuming data loaders that return, for example, a simple count, somewhat more cumbersome. It is achievable by returning something like { count: 21 }, but then every consumer (generally GraphQL type resolvers) must pull that value out of the response from the data loader.

Is there a reason that redis-dataloader could not allow arbitrary primitives, such as numbers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions