{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/631","labels_url":"https://api.github.com/repos/facebook/relay/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/631/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/631/events","html_url":"https://github.com/facebook/relay/issues/631","id":118696789,"number":631,"title":"Offline, caching, service workers","user":{"login":"kevinSuttle","id":95672,"avatar_url":"https://avatars.githubusercontent.com/u/95672?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinSuttle","html_url":"https://github.com/kevinSuttle","followers_url":"https://api.github.com/users/kevinSuttle/followers","following_url":"https://api.github.com/users/kevinSuttle/following{/other_user}","gists_url":"https://api.github.com/users/kevinSuttle/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinSuttle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinSuttle/subscriptions","organizations_url":"https://api.github.com/users/kevinSuttle/orgs","repos_url":"https://api.github.com/users/kevinSuttle/repos","events_url":"https://api.github.com/users/kevinSuttle/events{/privacy}","received_events_url":"https://api.github.com/users/kevinSuttle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-24T20:31:43Z","updated_at":"2015-11-24T22:28:48Z","closed_at":"2015-11-24T22:28:48Z","body":"Hello Relay team. @leebyron sent me over. https://github.com/facebook/graphql/issues/124\r\n\r\nWondering if you have some perspective on Relay/React/GraphQL intelligent caching, state reconciliation, etc. Was wondering if you had any strategies, or have been testing during [2G Tuesdays](https://code.facebook.com/posts/1556407321275493/building-for-emerging-markets-the-story-behind-2g-tuesdays/).\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/159426481","html_url":"https://github.com/facebook/relay/issues/631#issuecomment-159426481","issue_url":"https://api.github.com/repos/facebook/relay/issues/631","id":159426481,"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},"created_at":"2015-11-24T22:28:48Z","updated_at":"2015-11-24T22:28:48Z","body":"We cover Relay's approach to caching in-depth as part of the [Thinking in GraphQL guide](https://facebook.github.io/relay/docs/thinking-in-graphql.html#client-caching). Typical approaches such as HTTP caching don't really apply with overlapping, hierarchical queries (as @leebyron mentioned, this is the same problem with caching the results of SQL queries). \r\n\r\nState reconciliation might refer to several things - what specifically do you mean? Note that Relay allows developers to optionally conform to the [Object Identification specification](https://facebook.github.io/relay/docs/graphql-object-identification.html#content), allowing Relay to automatically de-dupe results from queries and normalize response for you.\r\n\r\nWe're also working on caching data for offline use as mentioned on the [roadmap](https://github.com/facebook/relay/wiki/Roadmap). \r\n\r\nRe service workers, you could for example inject a [custom network layer](https://facebook.github.io/relay/docs/guides-network-layer.html#content) that was backed by a service worker.\r\n\r\nI'm going to close this since there's no issue or bug to track, but feel free to continue the discussion here."}}