{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/486","labels_url":"https://api.github.com/repos/facebook/relay/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/486/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/486/events","html_url":"https://github.com/facebook/relay/issues/486","id":112012858,"number":486,"title":"Relay is inlining scalar fragment variables","user":{"login":"vladar","id":115628,"avatar_url":"https://avatars.githubusercontent.com/u/115628?v=3","gravatar_id":"","url":"https://api.github.com/users/vladar","html_url":"https://github.com/vladar","followers_url":"https://api.github.com/users/vladar/followers","following_url":"https://api.github.com/users/vladar/following{/other_user}","gists_url":"https://api.github.com/users/vladar/gists{/gist_id}","starred_url":"https://api.github.com/users/vladar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladar/subscriptions","organizations_url":"https://api.github.com/users/vladar/orgs","repos_url":"https://api.github.com/users/vladar/repos","events_url":"https://api.github.com/users/vladar/events{/privacy}","received_events_url":"https://api.github.com/users/vladar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-18T10:44:18Z","updated_at":"2015-10-19T16:09:25Z","closed_at":"2015-10-19T16:09:25Z","body":"I had an impression that Relay should extract all query and fragment variables to separate object, that is sent to the server alongside with query.\r\n\r\nBut scalar fragment variables are inlined in query. This makes some server side optimizations impossible (like caching query validation step which may be expensive).\r\n\r\nIs it intentional? Or am I missing something?\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/149261070","html_url":"https://github.com/facebook/relay/issues/486#issuecomment-149261070","issue_url":"https://api.github.com/repos/facebook/relay/issues/486","id":149261070,"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-10-19T16:09:25Z","updated_at":"2015-10-19T16:09:25Z","body":"> Would be great if we could do something like that with Relay, but I guess it might be hard for dynamic queries\r\n\r\nYup! We're exploring ways to save Relay queries in a build step and then upload ID + variables. The main challenges are Relay's dynamic queries and the need to map Relay's local variables into a global namespace. This is definitely on our radar though! I'm going to close this issue and file another one for the ability to save queries at build time. Thanks for asking about this!"}}