Skip to content

Commit

Permalink
Make function more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashko Stubailo committed Jul 1, 2016
1 parent b4ff58e commit a1f1da9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class QueryManager {
}
} else {
const resultFromStore = readSelectionSetFromStore({
store: this.getApolloCacheData(),
store: this.getDataWithOptimisticResults(),
rootId: queryStoreValue.query.id,
selectionSet: queryStoreValue.query.selectionSet,
variables: queryStoreValue.variables,
Expand Down Expand Up @@ -383,7 +383,7 @@ export class QueryManager {
} else {

const resultFromStore = readSelectionSetFromStore({
store: this.getApolloCacheData(),
store: this.getDataWithOptimisticResults(),
rootId: queryStoreValue.query.id,
selectionSet: queryStoreValue.query.selectionSet,
variables: queryStoreValue.variables,
Expand Down Expand Up @@ -450,7 +450,7 @@ export class QueryManager {
return this.store.getState()[this.reduxRootKey];
}

public getApolloCacheData(): NormalizedCache {
public getDataWithOptimisticResults(): NormalizedCache {
const state = this.getApolloState();
return merge({}, state.data, state.optimistic.data) as NormalizedCache;
}
Expand Down Expand Up @@ -673,7 +673,7 @@ export class QueryManager {
// this will throw an error if there are missing fields in
// the results if returnPartialData is false.
resultFromStore = readSelectionSetFromStore({
store: this.getApolloCacheData(),
store: this.getDataWithOptimisticResults(),
rootId: querySS.id,
selectionSet: querySS.selectionSet,
variables,
Expand Down

0 comments on commit a1f1da9

Please sign in to comment.