{"action":"closed","number":1846,"pull_request":{"url":"https://api.github.com/repos/facebook/relay/pulls/1846","id":123341314,"html_url":"https://github.com/facebook/relay/pull/1846","diff_url":"https://github.com/facebook/relay/pull/1846.diff","patch_url":"https://github.com/facebook/relay/pull/1846.patch","issue_url":"https://api.github.com/repos/facebook/relay/issues/1846","number":1846,"state":"closed","locked":false,"title":"RFC: Teach compiler `--persist` option","user":{"login":"wincent","id":7074,"avatar_url":"https://avatars0.githubusercontent.com/u/7074?v=4","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},"body":"Sample usage:\r\n\r\n    relay-compiler --src ./src --schema schema.graphql --persist scripts/persistQuery.js\r\n\r\nWhere `persistQuery.js` looks like this:\r\n\r\n```\r\nfunction persistQuery(text) {\r\n  var id = someLogicToPersistQueryText(text);\r\n  return Promise.resolve(id);\r\n}\r\n```\r\n\r\nThe alternative in the absence of this option is to copy-paste the entire `RelayCompilerBin` implementation just to override that bit.\r\n\r\nNote that webpack makes this ghastly — necessitating the use of `eval` — because it wants to rewrite the `require` of the passed in module, which of course fails because it is dynamic. Google search turns up a bunch of results like this one lamenting the situation:\r\n\r\nhttps://stackoverflow.com/questions/30575060/require-js-files-dynamically-on-runtime-using-webpack\r\n\r\nApparently it's better in webpack 2.","created_at":"2017-05-31T18:44:35Z","updated_at":"2018-02-28T14:51:10Z","closed_at":"2018-02-28T14:51:10Z","merged_at":null,"merge_commit_sha":"0fefe87d74256718739fd5f02d50d6b238aefb35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":246341366,"url":"https://api.github.com/repos/facebook/relay/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/relay/pulls/1846/commits","review_comments_url":"https://api.github.com/repos/facebook/relay/pulls/1846/comments","review_comment_url":"https://api.github.com/repos/facebook/relay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/relay/issues/1846/comments","statuses_url":"https://api.github.com/repos/facebook/relay/statuses/d6848eef6747f82667f62c55347782f43639eafa","head":{"label":"wincent:glh/persist","ref":"glh/persist","sha":"d6848eef6747f82667f62c55347782f43639eafa","user":{"login":"wincent","id":7074,"avatar_url":"https://avatars0.githubusercontent.com/u/7074?v=4","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},"repo":{"id":40698503,"name":"relay","full_name":"wincent/relay","owner":{"login":"wincent","id":7074,"avatar_url":"https://avatars0.githubusercontent.com/u/7074?v=4","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},"private":false,"html_url":"https://github.com/wincent/relay","description":"Relay is a JavaScript framework for building data-driven React applications.","fork":true,"url":"https://api.github.com/repos/wincent/relay","forks_url":"https://api.github.com/repos/wincent/relay/forks","keys_url":"https://api.github.com/repos/wincent/relay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wincent/relay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wincent/relay/teams","hooks_url":"https://api.github.com/repos/wincent/relay/hooks","issue_events_url":"https://api.github.com/repos/wincent/relay/issues/events{/number}","events_url":"https://api.github.com/repos/wincent/relay/events","assignees_url":"https://api.github.com/repos/wincent/relay/assignees{/user}","branches_url":"https://api.github.com/repos/wincent/relay/branches{/branch}","tags_url":"https://api.github.com/repos/wincent/relay/tags","blobs_url":"https://api.github.com/repos/wincent/relay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wincent/relay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wincent/relay/git/refs{/sha}","trees_url":"https://api.github.com/repos/wincent/relay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wincent/relay/statuses/{sha}","languages_url":"https://api.github.com/repos/wincent/relay/languages","stargazers_url":"https://api.github.com/repos/wincent/relay/stargazers","contributors_url":"https://api.github.com/repos/wincent/relay/contributors","subscribers_url":"https://api.github.com/repos/wincent/relay/subscribers","subscription_url":"https://api.github.com/repos/wincent/relay/subscription","commits_url":"https://api.github.com/repos/wincent/relay/commits{/sha}","git_commits_url":"https://api.github.com/repos/wincent/relay/git/commits{/sha}","comments_url":"https://api.github.com/repos/wincent/relay/comments{/number}","issue_comment_url":"https://api.github.com/repos/wincent/relay/issues/comments{/number}","contents_url":"https://api.github.com/repos/wincent/relay/contents/{+path}","compare_url":"https://api.github.com/repos/wincent/relay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wincent/relay/merges","archive_url":"https://api.github.com/repos/wincent/relay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wincent/relay/downloads","issues_url":"https://api.github.com/repos/wincent/relay/issues{/number}","pulls_url":"https://api.github.com/repos/wincent/relay/pulls{/number}","milestones_url":"https://api.github.com/repos/wincent/relay/milestones{/number}","notifications_url":"https://api.github.com/repos/wincent/relay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wincent/relay/labels{/name}","releases_url":"https://api.github.com/repos/wincent/relay/releases{/id}","deployments_url":"https://api.github.com/repos/wincent/relay/deployments","created_at":"2015-08-14T06:02:05Z","updated_at":"2017-01-24T23:23:14Z","pushed_at":"2017-06-09T07:15:00Z","git_url":"git://github.com/wincent/relay.git","ssh_url":"git@github.com:wincent/relay.git","clone_url":"https://github.com/wincent/relay.git","svn_url":"https://github.com/wincent/relay","homepage":"https://facebook.github.io/relay/","size":7651,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":3,"open_issues":0,"watchers":8,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"903a945106bfd149e806a120d44b9cedaa4842bc","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":40508605,"name":"relay","full_name":"facebook/relay","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/relay","description":"Relay is a JavaScript framework for building data-driven React applications.","fork":false,"url":"https://api.github.com/repos/facebook/relay","forks_url":"https://api.github.com/repos/facebook/relay/forks","keys_url":"https://api.github.com/repos/facebook/relay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/relay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/relay/teams","hooks_url":"https://api.github.com/repos/facebook/relay/hooks","issue_events_url":"https://api.github.com/repos/facebook/relay/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/relay/events","assignees_url":"https://api.github.com/repos/facebook/relay/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/relay/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/relay/tags","blobs_url":"https://api.github.com/repos/facebook/relay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/relay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/relay/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/relay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/relay/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/relay/languages","stargazers_url":"https://api.github.com/repos/facebook/relay/stargazers","contributors_url":"https://api.github.com/repos/facebook/relay/contributors","subscribers_url":"https://api.github.com/repos/facebook/relay/subscribers","subscription_url":"https://api.github.com/repos/facebook/relay/subscription","commits_url":"https://api.github.com/repos/facebook/relay/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/relay/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/relay/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/relay/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/relay/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/relay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/relay/merges","archive_url":"https://api.github.com/repos/facebook/relay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/relay/downloads","issues_url":"https://api.github.com/repos/facebook/relay/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/relay/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/relay/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/relay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/relay/labels{/name}","releases_url":"https://api.github.com/repos/facebook/relay/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/relay/deployments","created_at":"2015-08-10T22:09:16Z","updated_at":"2018-02-28T14:35:53Z","pushed_at":"2018-02-28T13:42:27Z","git_url":"git://github.com/facebook/relay.git","ssh_url":"git@github.com:facebook/relay.git","clone_url":"https://github.com/facebook/relay.git","svn_url":"https://github.com/facebook/relay","homepage":"https://facebook.github.io/relay/","size":19562,"stargazers_count":10579,"watchers_count":10579,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":993,"mirror_url":null,"archived":false,"open_issues_count":151,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":993,"open_issues":151,"watchers":10579,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/relay/pulls/1846"},"html":{"href":"https://github.com/facebook/relay/pull/1846"},"issue":{"href":"https://api.github.com/repos/facebook/relay/issues/1846"},"comments":{"href":"https://api.github.com/repos/facebook/relay/issues/1846/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/relay/pulls/1846/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/relay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/relay/pulls/1846/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/relay/statuses/d6848eef6747f82667f62c55347782f43639eafa"}},"author_association":"MEMBER","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":25,"review_comments":6,"maintainer_can_modify":false,"commits":3,"additions":21,"deletions":5,"changed_files":2}}
{"actor":{"display_login":"alloy"}}