facebook / facebook/relay

Field alias not available in proxy store

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

Description

Given the following mutation, I expect to have a `userId` field available in the proxy store.
```
const mutation = graphql`
mutation SetUserName($name: String!) {
setUserName(name: $name) {
user {
userId: id
name
}
}
}
`;
```

However, the alias isn't applied:
```
store.getRootField('setUserName').getLinkedRecord('user').getValue('userId') // undefined
```

Not sure if bug or planned for performance reasons. If it isn't a bug, I'll PR the docs, since it was a little bit of a gotcha.

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.