{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/538","repository_url":"https://api.github.com/repos/facebook/relay","labels_url":"https://api.github.com/repos/facebook/relay/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/538/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/538/events","html_url":"https://github.com/facebook/relay/issues/538","id":114647374,"number":538,"title":"[meta] Simpler Mutations API","user":{"login":"josephsavona","id":6425824,"avatar_url":"https://avatars.githubusercontent.com/u/6425824?v=3","gravatar_id":"","url":"https://api.github.com/users/josephsavona","html_url":"https://github.com/josephsavona","followers_url":"https://api.github.com/users/josephsavona/followers","following_url":"https://api.github.com/users/josephsavona/following{/other_user}","gists_url":"https://api.github.com/users/josephsavona/gists{/gist_id}","starred_url":"https://api.github.com/users/josephsavona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephsavona/subscriptions","organizations_url":"https://api.github.com/users/josephsavona/orgs","repos_url":"https://api.github.com/users/josephsavona/repos","events_url":"https://api.github.com/users/josephsavona/events{/privacy}","received_events_url":"https://api.github.com/users/josephsavona/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/relay/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/facebook/relay/labels/mutations","name":"mutations","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"wincent","id":7074,"avatar_url":"https://avatars.githubusercontent.com/u/7074?v=3","gravatar_id":"","url":"https://api.github.com/users/wincent","html_url":"https://github.com/wincent","followers_url":"https://api.github.com/users/wincent/followers","following_url":"https://api.github.com/users/wincent/following{/other_user}","gists_url":"https://api.github.com/users/wincent/gists{/gist_id}","starred_url":"https://api.github.com/users/wincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wincent/subscriptions","organizations_url":"https://api.github.com/users/wincent/orgs","repos_url":"https://api.github.com/users/wincent/repos","events_url":"https://api.github.com/users/wincent/events{/privacy}","received_events_url":"https://api.github.com/users/wincent/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-11-02T17:49:56Z","updated_at":"2016-06-14T22:02:58Z","closed_at":null,"body":"This is a meta-task to track progress toward making Relay mutations simpler to both understand and to define in common cases.\r\n\r\nIn a client/server system there is an unavoidable complexity in handling writes: \r\n- Making network requests\r\n- Handling error (and possibly retries)\r\n- Sequencing possibly overlapping writes\r\n- Handling optimistic changes and reverting them on error, or clearing them on success\r\n- Handling server response payloads\r\n- (server) Implementing business logic to process incoming writes\r\n\r\nRelay handles the vast majority of this complexity on behalf of developers. The tradeoff is that GraphQL mutations are abstracted from the underlying data store, and therefore the system *cannot automatically know what changed*. This requires the developer to tell the system what changed in the form of mutation configs (`getConfigs`). \r\n\r\nThere are several avenues for exploration:\r\n1. Simplify the process of defining mutation configs. @steveluscher proposed creating helper functions that would replace the need for the mutation config objects.\r\n2. Require product developers to manually convert the mutation payload into a set of change operations (e.g. `set('record', 'field', 'value')` or `append('connection', 'edgeId')`). If Relay could understand a small set of these change operations, the community could work to define helpers for converting payloads into this form.\r\n3. Create a standard response format for GraphQL mutations to match the change operations from 2, such that mutations would return a description of what changed. This would not reduce the work of defining mutations, but would allow defining the changes once instead of once per client.\r\n\r\nIt's important to note that the current mutations API is heavily skewed toward practicality: it has allowed us to iterate quickly and produce resilient applications. We're interested in making this API better and welcome contributions from the community. In particular, the best form of contribution is either links to prototypes or pull requests, which will help us and the community understand the practical tradeoffs of any alternative APIs."},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/226029918","html_url":"https://github.com/facebook/relay/issues/538#issuecomment-226029918","issue_url":"https://api.github.com/repos/facebook/relay/issues/538","id":226029918,"user":{"login":"eugenehp","id":1857263,"avatar_url":"https://avatars.githubusercontent.com/u/1857263?v=3","gravatar_id":"","url":"https://api.github.com/users/eugenehp","html_url":"https://github.com/eugenehp","followers_url":"https://api.github.com/users/eugenehp/followers","following_url":"https://api.github.com/users/eugenehp/following{/other_user}","gists_url":"https://api.github.com/users/eugenehp/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenehp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenehp/subscriptions","organizations_url":"https://api.github.com/users/eugenehp/orgs","repos_url":"https://api.github.com/users/eugenehp/repos","events_url":"https://api.github.com/users/eugenehp/events{/privacy}","received_events_url":"https://api.github.com/users/eugenehp/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T22:02:58Z","updated_at":"2016-06-14T22:02:58Z","body":"Hi @wincent \r\nDo you have any ETA about multiple file uploads?"}}
{"actor":{"display_login":"eugenehp"}}