Skip to content

Commit

Permalink
Update src/test-suites/null-keys/b.subgraph.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela authored Oct 22, 2024
1 parent 95a7720 commit 0d92b24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test-suites/null-keys/b.subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default createSubgraph("b", {
book = books.find((book) => book.upc === reference.upc);
}
if (book != null) {
// Return this null on purpose
// `a` has `Book` entities with upc: `b1, b2, b3`, but `b` has `Book` entities with only `b1` and `b2`.
// `b3` is not available and this subgraph is the only possible step to get to the other subgraph (need of `id` field) to resolve the author.
if (book.id === '3') {
return null;
}
Expand Down

0 comments on commit 0d92b24

Please sign in to comment.