facebook / facebook/relay

Relay modern: setValue of a record. Allow to pass an object.

Open
#2,441 14 comments 7 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hi, relay modern [doesn't](https://github.com/facebook/relay/blob/083db04e6fedad744c3c1b3f0224004e136b4313/packages/relay-runtime/mutations/RelayRecordProxy.js#L151) allow us to set object as a value for a property of a record. I'm using [JSON](https://github.com/taion/graphql-type-json) type for a field in my graphql type. ![Pic](https://api.monosnap.com/rpc/file/download?id=nHxAPBhdsErffvsQ5aEAg7vDtn9oKp)
Relay understands it as a scalar type:
![Pic](https://api.monosnap.com/rpc/file/download?id=JyKwZcu0fbOX6qsUg5RTAVqOxTp8V0)

Is there any chance to allow pass an object as a value to `setValue`?

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.