dataloader-align-results
Advanced tools
Comparing version 0.2.1 to 0.3.0
# Change Log | ||
## [v0.2.1](https://github.com/eddyystop/dataloader-align-results/tree/v0.2.1) (2017-10-06) | ||
[Full Changelog](https://github.com/eddyystop/dataloader-align-results/compare/v0.2.0...v0.2.1) | ||
## [v0.2.0](https://github.com/eddyystop/dataloader-align-results/tree/v0.2.0) (2017-10-06) | ||
@@ -4,0 +7,0 @@ [Full Changelog](https://github.com/eddyystop/dataloader-align-results/compare/v0.1.0...v0.2.0) |
const debug = require('debug')('dataloader-align-results'); | ||
// Note that we cannot cannot verify []! or [!]! contain any non-null elements as | ||
@@ -30,2 +32,4 @@ // the DataLoader forms the final Array from elements we return here and elements in the cache. | ||
return function dataLoaderAlignResultsInner (keys, resultArray) { | ||
debug('started', keys, resultArray); | ||
if (resultArray === null) resultArray = []; | ||
@@ -67,3 +71,3 @@ if (typeof resultArray === 'object' && !Array.isArray(resultArray)) resultArray = [resultArray]; | ||
// return [null, [{id: 2, bar: 12}], null, [{id: 1, bar: 10}, {id: 1, bar: 11}] | ||
return keys.map((key, i) => { | ||
const result = keys.map((key, i) => { | ||
const serializedKey = serializeDataLoaderKey(key); | ||
@@ -78,3 +82,6 @@ const value = hash[serializedKey] || null; | ||
}); | ||
debug('result=', result); | ||
return result; | ||
}; | ||
}; |
{ | ||
"name": "dataloader-align-results", | ||
"description": "Takes your back-end results and returns an Array acceptable to DataLoader.", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/eddyystop/dataloader-align-results", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10683
65