question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Router Relay - unclear how ViewerQueries ties in

See original GitHub issue

For all the <Route>s you do queries={ViewerQueries} where in all the previous sections we have been building on top of this query object. So what happened to all that work we did?

I know the answer is fundamentally in the code, but as I read the section I just couldn’t like the ideas.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ram535iicommented, Sep 22, 2016

Sorry for being so unclear, must have been tired. So I’m talking about this section of the tutorial.

It’s basically unclear why we are passing in the ViewerQueries object into the routes. The user has just spent the last few sections reading about building queries on top of viewer and it would just be nice to have some more explanation connecting the two. For example (and I’m making this up, probably wrong), 'The ViewerQueries object is passed into every route so that the component for that route can attach its query requirements to the top level query`.

Is that a little clearer?

0reactions
marktanicommented, Oct 17, 2016

In #37, I added a sentence on the ViewerQueries, I hope it is clear now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Deprecated] Relay Classic integration for React Router - GitHub
Apply the useRelay router middleware, pass in a Relay environment to <Router> , then define Relay queries and render callbacks for each of...
Read more >
How do I use react router with relay? - Stack Overflow
Another thing I noticed is that usePreloadedQuery should be used in conjunction with useQueryLoader ; At the same time in docs they load...
Read more >
Routing | Relay
Historically, Relay started out internally at Facebook as a routing framework. However, Relay no longer makes any assumptions about routing, and works with ......
Read more >
react-router-relay - npm
Use ReactRouterRelay.createElement on your <Router> , then define Relay queries and render callbacks for each of your routes:.
Read more >
React Router with GraphQL & Relay Tutorial
In this section, you'll learn how to use the react-router library with Relay to implement some navigation functionality!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found