relay-tools/react-router-relay

Route props as query variables

Closed this issue · 1 comments

It does not seem to currently be possible to assign a relay query with parameters outside of those in the url (path and query string params). Is there any interest in being able to pass these variables down via properties on the route?

My reason for this is to pass auth data to a query without having it be part of the url. What i would like to have is something like the following.

<Router history={history} createElement={ReactRouterRelay.createElement}>
            <Route path="/"
                    component={Profile}
                    queries={userQuery}
                    authData={authData}/> 
<Router/>

If this is something that others would like to have as well i would be more than happy to open a pull request with this addition. Please tell me if there are better ways to achieve similar results.

duplicate