Skip to content

Commit

Permalink
Mark partial results that do not have all values as pending
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Feb 3, 2017
1 parent e2a8eab commit 5472f41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resolver/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ class Builder {
.map(r => {
// Ensure that partial matching exposes the values in the expression
if(r.expression) {
r.pending = false;
r.expression.forEach(part => {
if(part.type === 'value') {
part.value = r.values[part.id] || null;
if(part.value === null) {
r.pending = true;
}
}
});
}

return r;
})

Expand Down

0 comments on commit 5472f41

Please sign in to comment.