Hacker News new | ask | show | jobs
by davewritescode 3252 days ago
GraphQL only solves half the problem, how do you update resources with GraphQL?
3 comments

GraphQL supports both queries to access data and _mutations_ to change data:

  mutation {
    createUser(u: "user", p: "pass") {
      u,
      p
    }
  }
That's actually awesome, thanks for pointing that out!
and in addition to mutations (which mutate data stored in the backend) you can use subscriptions to update your local data store once they changed
By using mutations.