[Modern] Poor error message for arrays without plural directive
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The error message supplied when forgetting to add a plural directive is terrible:
> Error: Attempted to update component `Relay(Songs)` that has already been unmounted (or failed to mount).
incorrect:
```
import Songs from './component';
export const query = graphql`
query songsContainerQuery {
songs {
...songsContainer_songs
}
}
`;
export default createFragmentContainer(Songs, graphql`
fragment songsContainer_songs on Song {
name
}`,
);
```
correct:
```
graphql`
fragment songsContainer_songs on Song @relay(plural: true) {
name
}`
```
Relay modern should give a better error message when forgetting this.
More information: https://stackoverflow.com/questions/46757227/relay-modern-attempted-to-update-component-relaysongs-that-has-already-been/46759043#46759043
Contributor guide
Assessment
This issue has not been assessed yet.