graphql / graphql/dataloader

[REQUEST] return Object instead of map of a arguments in batchFn

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
13.4k
Forks
518
Avg merge
2d 4h
Merged PRs (30d)
2

Description

## What problem are you trying to solve?

Use object in batchFn return instead of function.

## Describe the solution you'd like

The user should be able to return an object which contains the key as a cacheKey and its return value as a return. This can improve perf for very large requests/args. instead of mapping the the args with the result, the user can now create an object from the result.

## Describe alternatives you've considered

## Additional context

Mapping the args for a very few results from the backend is time-consuming.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.