facebook / facebook/relay

Async Relay Resolvers

Open
#4,537 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

There is no mention on [Relay Resolvers](https://relay.dev/docs/guides/relay-resolvers/) about async resolvers / promises, and they seem to not work currently (I get an error about the object not having an "id" field, since the unresolved promise does not have the field; related #4536). I'm trying to use the experimental Relay Resolvers to nicely manage optimistic states / updaters and querying for several external REST APIs for a client-only app. To do this, async resolvers are necessary to make the REST calls. The Relay Resolvers system seems like a really cool way to support something like this, since I can just write clientside code to fetch data for a field and have relay manage syncing that across my app / fetching as needed if its not cached etc. The lack of async seems like a restrictive limitation atm. Is this something that is planned to be changed?

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.