Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify written results using processed StoreObject in StoreWriter#processSelectionSet #8996

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Slightly better return type for collectSpecifierPaths.
  • Loading branch information
benjamn committed Nov 3, 2021
commit 1d01a67f9e81d9cff1400f29c9019963261b8fac
4 changes: 2 additions & 2 deletions src/cache/inmemory/key-extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function keyArgsFnFromSpecifier(specifier: KeySpecifier): KeyArgsFunction
export function collectSpecifierPaths(
specifier: KeySpecifier,
extractor: (path: string[]) => any,
) {
): Record<string, any> {
// For each path specified by specifier, invoke the extractor, and repeatedly
// merge the results together, with appropriate ancestor context.
const merger = new DeepMerger;
Expand Down Expand Up @@ -205,7 +205,7 @@ function normalize<T>(value: T): T {
return collectSpecifierPaths(
Object.keys(value).sort(),
path => extractKeyPath(value, path),
);
) as T;
}
return value;
}
Expand Down