Commit 6d5521d
committed
fix: load all deck cards instead of silently truncating at 500
The Deck query capped deckCards at first: 500 and selected pageInfo but never
paginated, so decks with more than 500 card rows (e.g. cubes) were silently
truncated — corrupting deck stats, prices, and the pull list with no warning.
Thread a $deckCardsAfter cursor through the Deck query and walk fetchMore in
detail-page until hasNextPage is false, merging pages via updateQuery. Normal
decks report hasNextPage=false on the first page, so the loop never runs for
them; only oversized decks pay the extra requests. The merge writes into the
observed { id } query entry, so the tag optimistic-update cache reads/writes
are unaffected. Works in share mode too (the public share schema paginates
deck_cards identically).
The buylist is computed server-side and was never affected.
Addresses #101; the separate decks-list (first: 100) truncation is tracked
in #128.1 parent eb5161c commit 6d5521d
4 files changed
Lines changed: 42 additions & 7 deletions
0 commit comments