facebook / facebook/relay

[modern] how to use connection in mutation's updater or config

Open
#2,200 9 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

# mutation updater nest connection

```js
const mutation = graphql`
mutation updateAccountRoles_Mutation (
$input: updateUserRolesInput!
){
updateUserRoles(input: $input){
account {
roles {
edges {
node {
id
name
}
}
}
}
}
}
`;
```
> At first i think relay modern will udpate the account node auto.But nothing happen.l try to use connectionHandler to update the roles connection.but connectionHandler.update doesn't work too.

> there has edges in response . But the ui doesn't update. in the component componetWillReceiveProps
doesn't work too.

> l don't know how to update the whole connection?Anybody can help me? thank you

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.