{"action":"closed","issue":{"url":"https://api.github.com/repos/apollostack/react-apollo/issues/360","repository_url":"https://api.github.com/repos/apollostack/react-apollo","labels_url":"https://api.github.com/repos/apollostack/react-apollo/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/react-apollo/issues/360/comments","events_url":"https://api.github.com/repos/apollostack/react-apollo/issues/360/events","html_url":"https://github.com/apollostack/react-apollo/issues/360","id":194167011,"number":360,"title":"How to transfer variable to query at loading component state","user":{"login":"ARMGAMES","id":20094067,"avatar_url":"https://avatars.githubusercontent.com/u/20094067?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMGAMES","html_url":"https://github.com/ARMGAMES","followers_url":"https://api.github.com/users/ARMGAMES/followers","following_url":"https://api.github.com/users/ARMGAMES/following{/other_user}","gists_url":"https://api.github.com/users/ARMGAMES/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMGAMES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMGAMES/subscriptions","organizations_url":"https://api.github.com/users/ARMGAMES/orgs","repos_url":"https://api.github.com/users/ARMGAMES/repos","events_url":"https://api.github.com/users/ARMGAMES/events{/privacy}","received_events_url":"https://api.github.com/users/ARMGAMES/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-07T20:56:18Z","updated_at":"2016-12-09T22:17:09Z","closed_at":"2016-12-09T22:17:09Z","body":"I have a simple react component that must load data from server when user ask it. Problem is that i don't know how to transfer dynamic variable speakerUrl and access it in before component load state. Sure i can access it from `this.props.params`, but component is not loaded and i can't access it when i make a graphql query. Query - `QuerySpeaker` is working fine when i manualy set url variable.\r\n\r\n**Router**\r\n\r\n    <Route path=\"/speaker/:speakerUrl\" component={SpeakerPage} />\r\n\r\n**Component - SpeakerPage**\r\n\r\n    import React from 'react';\r\n    import { graphql } from 'react-apollo';\r\n    \r\n    import { QuerySpeaker } from '../redux/graphql/querys';\r\n    \r\n    class SpeakerPage extends React.Component {\r\n        render( ) {\r\n            console.log( this.props );\r\n            return (\r\n                <div className=\"ui container\">\r\n                    <div className=\"ui grid\">\r\n                        <div className=\"row\">\r\n                            Hello\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            )\r\n        }\r\n    }\r\n    \r\n    export default graphql(QuerySpeaker, {\r\n         options: ({ url }) => ({ variables: { url } }) <- here is my problem, how can i set this url variable?\r\n    })( SpeakerPage );"}}
{"actor":{"display_login":"ARMGAMES"}}