mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## For Contributors ### Fixing a bug - Fixes #(open or reference an issue if one exists, otherwise omit) - No tests required — this is an `examples/` change only - No custom error links needed — failures are surfaced via Apollo's built-in error state --- ## Summary - `PostList` destructured `data` before checking `loading`/`error`, so the component threw when `data` was `undefined` (e.g., on the initial fetch or after a query error) instead of showing the loading/error UI. - Move the `error`/`loading`/`!data` guard clauses above the `data` destructuring and `loadMorePosts` definition, and add a `!data` check so the component never accesses properties on an undefined value. - Bump `graphql` (`14.5.8` → `16.13.1`) and `lodash` (`4.17.20` → `4.17.23`) in the example's `package.json` to pick up fixes in dependencies the example relies on. ## Note: Initially this PR suppose to target upstream DB issue