graphql-model
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -158,2 +158,9 @@ 'use strict'; | ||
_createClass(Model, [{ | ||
key: 'destroy', | ||
value: function destroy() { | ||
delete this._raw; | ||
delete this._parent; | ||
delete this._cached; | ||
} | ||
}, { | ||
key: 'getRawData', | ||
@@ -174,2 +181,7 @@ value: function getRawData() { | ||
}, { | ||
key: 'removeParent', | ||
value: function removeParent() { | ||
this._parent = null; | ||
} | ||
}, { | ||
key: 'getParentOfType', | ||
@@ -189,2 +201,11 @@ value: function getParentOfType(Type) { | ||
}, { | ||
key: 'clearCache', | ||
value: function clearCache(key) { | ||
if (key) { | ||
delete this._cached[key]; | ||
} else { | ||
this._cached = {}; | ||
} | ||
} | ||
}, { | ||
key: 'implements', | ||
@@ -191,0 +212,0 @@ value: function _implements(Type) { |
{ | ||
"name": "graphql-model", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A data model class for wrapping a data object for easier resolving fields in GraphQL", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
16423
223