{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/1098","repository_url":"https://api.github.com/repos/facebook/relay","labels_url":"https://api.github.com/repos/facebook/relay/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/1098/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/1098/events","html_url":"https://github.com/facebook/relay/issues/1098","id":151705901,"number":1098,"title":"Duplicate RelayQueryTracker trackedNodes generating giant mutation fat query fragment","user":{"login":"finneganh","id":260837,"avatar_url":"https://avatars.githubusercontent.com/u/260837?v=3","gravatar_id":"","url":"https://api.github.com/users/finneganh","html_url":"https://github.com/finneganh","followers_url":"https://api.github.com/users/finneganh/followers","following_url":"https://api.github.com/users/finneganh/following{/other_user}","gists_url":"https://api.github.com/users/finneganh/gists{/gist_id}","starred_url":"https://api.github.com/users/finneganh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finneganh/subscriptions","organizations_url":"https://api.github.com/users/finneganh/orgs","repos_url":"https://api.github.com/users/finneganh/repos","events_url":"https://api.github.com/users/finneganh/events{/privacy}","received_events_url":"https://api.github.com/users/finneganh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-04-28T18:01:32Z","updated_at":"2016-07-26T17:53:19Z","closed_at":null,"body":"I'm tracking down an issue where Relay generated a mutation request with ~15k instances of an \"id\" field lookup within the same fragment.\r\n\r\nOur application shows some near-realtime data that we've been getting by calling `forceFetch` on a timer within our component.\r\n\r\nWhat I think is happening is that each of the responses to that causes a new entry to be added to the RelayQueryTracker. When a mutation for the same node is run, Relay compares these children to the fatQuery. While the fragment that was `forceFetch`'d is not matched, the lookup for the `id` field is. Since these field references are not de-duped in the mutation query, the generated GraphQL has “id” once for each `forceFetch` request that was made.\r\n\r\nI think that the right solution is to try and reduce the buildup in the tracker by de-duping, at least as merge time but possibly when the number of children grows to a certain size? I'm willing to put some work into fixing this, but I'd like to know what a recommended approach would be."},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/235350081","html_url":"https://github.com/facebook/relay/issues/1098#issuecomment-235350081","issue_url":"https://api.github.com/repos/facebook/relay/issues/1098","id":235350081,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T17:53:19Z","updated_at":"2016-07-26T17:53:19Z","body":"I think this may actually be resolved by https://github.com/facebook/relay/commit/bb67f9c9029e195734606e8479a15d7e6da91b23."}}
{"actor":{"display_login":"taion"}}