Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async *resolveElements(match) {
// TODO: Close over and abort earlier requests?
const routeMatches = getRouteMatches(match);
const { routeIndices } = match;
const Components = getComponents(routeMatches);
const matchQueries = getRouteValues(
routeMatches,
route => route.getQueries,
route => route.queries,
);
const extraQueryNodes = getRouteValues(
routeMatches,
route => route.getExtraQuery,
route => route.extraQuery,
);
const forceFetches = getRouteValues(
routeMatches,
route => route.getForceFetch,
route => route.forceFetch,
);
const routeParams = this.getRouteParams(match, routeMatches);
const queryConfigs = this.getQueryConfigs(
matchQueries,
routeIndices,
routeParams,
);
async *resolveElements(match) {
// TODO: Close over and abort earlier requests?
const routeMatches = getRouteMatches(match);
const { routeIndices } = match;
const Components = getComponents(routeMatches);
const matchQueries = getRouteValues(
routeMatches,
route => route.getQueries,
route => route.queries,
);
const extraQueryNodes = getRouteValues(
routeMatches,
route => route.getExtraQuery,
route => route.extraQuery,
);
const forceFetches = getRouteValues(
routeMatches,
route => route.getForceFetch,
route => route.forceFetch,
);
const routeParams = this.getRouteParams(match, routeMatches);
const routeMatches = getRouteMatches(match);
const { routeIndices } = match;
const Components = getComponents(routeMatches);
const matchQueries = getRouteValues(
routeMatches,
route => route.getQueries,
route => route.queries,
);
const extraQueryNodes = getRouteValues(
routeMatches,
route => route.getExtraQuery,
route => route.extraQuery,
);
const forceFetches = getRouteValues(
routeMatches,
route => route.getForceFetch,
route => route.forceFetch,
);
const routeParams = this.getRouteParams(match, routeMatches);
const queryConfigs = this.getQueryConfigs(
matchQueries,
routeIndices,
routeParams,
);
const extraQueries = this.getExtraQueries(extraQueryNodes, routeParams);
const earlyComponents = Components.some(isPromise)
? await Promise.all(Components.map(checkResolved))
: Components;
async *resolveElements(match) {
const routeMatches = getRouteMatches(match);
const Components = getComponents(routeMatches);
const queries = getRouteValues(
routeMatches,
route => route.getQuery,
route => route.query,
);
const cacheConfigs = getRouteValues(
routeMatches,
route => route.getCacheConfig,
route => route.cacheConfig,
);
const fetchPolicies = getRouteValues(
routeMatches,
route => route.getFetchPolicy,
route => route.fetchPolicy,
);
warning(
async *resolveElements(match) {
const routeMatches = getRouteMatches(match);
const Components = getComponents(routeMatches);
const queries = getRouteValues(
routeMatches,
route => route.getQuery,
route => route.query,
);
const cacheConfigs = getRouteValues(
routeMatches,
route => route.getCacheConfig,
route => route.cacheConfig,
);
const fetchPolicies = getRouteValues(
routeMatches,
route => route.getFetchPolicy,
route => route.fetchPolicy,
);
warning(
!routeMatches.some(({ route }) => route.dataFrom),
'`dataFrom` on routes no longer has any effect; use `fetchPolicy` instead.',
);
warning(
!routeMatches.some(({ route }) => route.getDataFrom),
'`getDataFrom` on routes no longer has any effect; use `getFetchPolicy` instead.',
);
const routeVariables = this.getRouteVariables(match, routeMatches);
const querySubscriptions = this.updateQuerySubscriptions(
async *resolveElements(match) {
const routeMatches = getRouteMatches(match);
const Components = getComponents(routeMatches);
const queries = getRouteValues(
routeMatches,
route => route.getQuery,
route => route.query,
);
const cacheConfigs = getRouteValues(
routeMatches,
route => route.getCacheConfig,
route => route.cacheConfig,
);
const fetchPolicies = getRouteValues(
routeMatches,
route => route.getFetchPolicy,
route => route.fetchPolicy,
);
warning(
!routeMatches.some(({ route }) => route.dataFrom),
'`dataFrom` on routes no longer has any effect; use `fetchPolicy` instead.',
);
warning(
!routeMatches.some(({ route }) => route.getDataFrom),