apollo-cache
Advanced tools
Comparing version 1.2.0-alpha.2 to 1.2.0-alpha.3
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('apollo-utilities')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'apollo-utilities'], factory) : | ||
(factory((global.apollo = global.apollo || {}, global.apollo.cache = global.apollo.cache || {}, global.apollo.cache.core = {}),global.apollo.utilities)); | ||
}(this, (function (exports,apolloUtilities) { 'use strict'; | ||
(global = global || self, factory((global.apollo = global.apollo || {}, global.apollo.cache = global.apollo.cache || {}, global.apollo.cache.core = {}), global.apollo.utilities)); | ||
}(this, function (exports, apolloUtilities) { 'use strict'; | ||
@@ -58,2 +58,3 @@ function queryFromPojo(obj) { | ||
Object.keys(obj).forEach(function (key) { | ||
var nestedSelSet = selectionSetFromObj(obj[key]); | ||
var field = { | ||
@@ -65,7 +66,4 @@ kind: 'Field', | ||
}, | ||
selectionSet: nestedSelSet || undefined, | ||
}; | ||
var nestedSelSet = selectionSetFromObj(obj[key]); | ||
if (nestedSelSet) { | ||
field.selectionSet = nestedSelSet; | ||
} | ||
selections.push(field); | ||
@@ -185,3 +183,3 @@ }); | ||
}))); | ||
})); | ||
//# sourceMappingURL=bundle.umd.js.map |
@@ -52,2 +52,3 @@ export function queryFromPojo(obj) { | ||
Object.keys(obj).forEach(function (key) { | ||
var nestedSelSet = selectionSetFromObj(obj[key]); | ||
var field = { | ||
@@ -59,7 +60,4 @@ kind: 'Field', | ||
}, | ||
selectionSet: nestedSelSet || undefined, | ||
}; | ||
var nestedSelSet = selectionSetFromObj(obj[key]); | ||
if (nestedSelSet) { | ||
field.selectionSet = nestedSelSet; | ||
} | ||
selections.push(field); | ||
@@ -66,0 +64,0 @@ }); |
{ | ||
"name": "apollo-cache", | ||
"version": "1.2.0-alpha.2", | ||
"version": "1.2.0-alpha.3", | ||
"description": "Core abstract of Caching layer for Apollo Client", | ||
@@ -42,3 +42,3 @@ "author": "James Baxley <james@meteor.com>", | ||
"dependencies": { | ||
"apollo-utilities": "^1.1.0-alpha.2" | ||
"apollo-utilities": "^1.1.0-alpha.3" | ||
}, | ||
@@ -58,3 +58,3 @@ "jest": { | ||
}, | ||
"gitHead": "a3e32b0ec42d221d443b402d108b428c53975d05" | ||
"gitHead": "44927d0674e8b06486aa76f325e9e5e6cd2c4887" | ||
} |
@@ -125,3 +125,3 @@ import { DocumentNode } from 'graphql'; | ||
try { | ||
typenameResult = this.read({ | ||
typenameResult = this.read<any>({ | ||
rootId: id, | ||
@@ -128,0 +128,0 @@ optimistic: false, |
export * from './cache'; | ||
export * from './types'; |
@@ -0,0 +0,0 @@ import { DataProxy } from './DataProxy'; |
@@ -0,0 +0,0 @@ import { DocumentNode } from 'graphql'; // eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved |
export * from './DataProxy'; | ||
export * from './Cache'; |
@@ -74,2 +74,4 @@ import { | ||
Object.keys(obj).forEach(key => { | ||
const nestedSelSet: SelectionSetNode = selectionSetFromObj(obj[key]); | ||
const field: FieldNode = { | ||
@@ -81,11 +83,5 @@ kind: 'Field', | ||
}, | ||
selectionSet: nestedSelSet || undefined, | ||
}; | ||
// Recurse | ||
const nestedSelSet: SelectionSetNode = selectionSetFromObj(obj[key]); | ||
if (nestedSelSet) { | ||
field.selectionSet = nestedSelSet; | ||
} | ||
selections.push(field); | ||
@@ -92,0 +88,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
60644
1031