Skip to content

Commit

Permalink
Remove unused assertIdValue function.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Aug 9, 2019
1 parent db9537a commit 054eb7b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/apollo-cache-inmemory/src/readFromStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
getMainDefinition,
getQueryDefinition,
getStoreKeyName,
IdValue,
isEqual,
isField,
isInlineFragment,
Expand Down Expand Up @@ -42,7 +41,7 @@ import {

import { wrap, KeyTrie } from 'optimism';
import { DepTrackingCache } from './depTrackingCache';
import { invariant, InvariantError } from 'ts-invariant';
import { InvariantError } from 'ts-invariant';
import { fragmentMatches } from './fragments';
import {
isReference,
Expand Down Expand Up @@ -564,13 +563,6 @@ function assertSelectionSetForIdValue(
}
}

export function assertIdValue(idValue: IdValue) {
invariant(isReference(idValue), `\
Encountered a sub-selection on the query, but the store doesn't have \
an object reference. This should never happen during normal use unless you have custom code \
that is directly manipulating the store; please file an issue.`);
}

function readStoreResolver(
object: StoreObject,
typename: string | void,
Expand Down

0 comments on commit 054eb7b

Please sign in to comment.