graphql / graphql/dataloader

CacheMap.get calls should await the promised value

Open
#319 2 comments 5 reactions 1 assignee Claimed by @vishalsingh2972 View on GitHub
Dominant language
JavaScript
Stars
13.4k
Forks
518
Avg merge
2d 4h
Merged PRs (30d)
2

Description

https://github.com/graphql/dataloader/blob/015a94c8db0b4974838a312634c12a2c5eb3d056/src/index.js#L88-L97

Seems like this prevents the use of async calls to centralized caches in it's current implementation since the returned promise will be 'Truthy' even if it resolves with a cache miss (null, undefined).

Wondering if there is a design reason for this, or a PR is welcome ?

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.