Usage with apollo
See original GitHub issueNavi looks like a really neat little routing alternative. Our data always come from Apollo though which allows to fetch all data required in a whole react tree in server rendering with getDataFromTree
is something like that possible with Navi?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
GraphQL On The Front-End (React And Apollo)
Usually, to handle GraphQL on the client-side, we make use of the Apollo Client. It allows developers to define, handle, and make queries/ ......
Read more >Reviews, Pros & Cons | Companies using Apollo - StackShare
438 companies reportedly use Apollo in their tech stacks, including The New York Times, medium.com, and CircleCI. The New York Times. medium.com ...
Read more >Apollo Client For Angular — Making Use of GraphQL - Medium
ApolloModule : This is the main module to make Apollo Client's features available in the Angular App; HttpLinkModule: Is used to fetch data...
Read more >A complete introduction to Apollo, the GraphQL toolkit
Apollo is a suite of tools to create a GraphQL server, and to consume a GraphQL API. Let's explore Apollo in detail, both...
Read more >How many UAD plug-ins can I run with my Apollo / UAD-2 ...
Note for Apollo Users: Apollo interfaces use DSP and memory resources for its internal mixer. Therefore, the UAD Meters will show some DSP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jamesknelson great, thanks for the explanation, I’m not sure when I will find time to try this out, as I’m on holiday in the next weeks, but I will let you know. If anyone want’s to try it in the the meantime, go ahead.
Thanks 😃
I just read through Apollo’s SSR docs now so I’m not an expert at this, but one approach would be to pass the
client
into Navi via context, and then useclient.query()
method within your Navi routes.You could then get the cache and put it in the generated HTML using a custom renderer, so that the fetched data is immediately available on the initial render.
This approach has the benefit that the next route won’t be shown until the query has resolved. And if you want to subscribe and watch the query, then you can still pass the query through to the component via prop.
(I don’t have much experience with Apollo so I’d love to hear if what I’m saying makes any sense)