I read on the react-router-relay that:
react-router-relay will automatically generate a combined Relay route with all queries and parameters from the active React Router routes, then pass down the query results to each of the route components. As the queries are all gathered onto a single route, they'll all be fetched at the same time, and the data for your entire page will load and then render in one go.
But in my app I actually see two separate calls to /graphql
. Here's my code:
<Route path="site_:siteId" component={AppSkeleton} queries={SiteAccountQueries}>
<Route path="mySites" component={Sites} queries={SiteAccountQueries} />
</Route>
The first call fetches the data for AppSkeleton
, and the second for Sites
. Wasn't it supposed to collapse them all into one single call? What am I doing wrong?