Mutating application state
Relay mutations are the actions that cause side effects in your systems, because they change the state of some resource that your UI cares about. What's interesting about Relay mutations is that they care about side effects that happen to your data as a result of a change in the state of something. For example, if you change the name of a user, this will certainly impact a screen that displays the user details. But, it could also impact a listing screen that shows several users.
The idea with Relay mutations is that you can tell them, ahead of time, where the application might be impacted in terms of side effects. Since other components may be affected by a mutation, we have already declared their data dependencies, Relay can handle this sort of thing! Awesome! Let's see what a mutation looks like:
class ChangeAgeMutation extends Relay.Mutation { static fragments = { user: () => Relay.QL` fragment on User { id, } ...