Skip to content

Conversation

@sidharthachatterjee
Copy link
Contributor

If skip and limit values are set in a way to get the last n elements, hasNextPage incorrectly returns true.

This pull request adds a failing test and fixes that behaviour.

Fixes #10497

@sidharthachatterjee sidharthachatterjee added the type: bug An issue or pull request relating to a bug in Gatsby label Dec 17, 2018
@pieh pieh changed the title [graphql-skip-limit] Fix hasNextPage fix(graphql-skip-limit): fix hasNextPage Dec 17, 2018
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @sidharthachatterjee! 🎉

@pieh pieh merged commit ea56c49 into master Dec 17, 2018
@pieh pieh deleted the fix/has-next-page branch December 17, 2018 13:35
m-allanson added a commit to lipis/gatsby that referenced this pull request Dec 17, 2018
* master: (1037 commits)
  Update starters.yml (gatsbyjs#10505)
  chore(release): Publish
  fix(graphql-skip-limit): fix hasNextPage (gatsbyjs#10504)
  chore: use cjs instead of esm for consistency (gatsbyjs#10494)
  feat(gatsby-remark-copy-linked-files): add support for video elements with `src` attribute (gatsbyjs#10395)
  typofix (gatsbyjs#10488)
  Add kobit.in to showcase (gatsbyjs#10496)
  fix(docs): window.reload => window.location.reload (gatsbyjs#10459)
  feat(www): add unbird feedback component to starter lib (gatsbyjs#10450)
  fix(blog): youfit case study typofix
  Doc improvements to Visual testing with Storybook guide (gatsbyjs#10436)
  fix(gatsby-plugin-offline): prevent incorrect revisioning of static file by workbox (gatsbyjs#10416)
  fix(starters): ttag repo link
  fix typo in pull request template (gatsbyjs#10454)
  fix(www) Fix query for plugin links always ?=undefined (gatsbyjs#10453)
  chore(release): Publish
  fix(gatsby): fix extracting StaticQuery nested in shorthand fragment (gatsbyjs#10443)
  fix(www): avoid querying for no-cache=1 (gatsbyjs#10389)
  fix(gatsby-image): update typescript definitions - properly mark fields as optional (gatsbyjs#10419)
  refactor(gatsby): improve EnsureResources (gatsbyjs#10224)
  ...
wconnorwalsh added a commit to wconnorwalsh/gatsby that referenced this pull request Dec 17, 2018
* master:
  docs: add ibm case study blog post (gatsbyjs#10474)
  Update sites.yml (gatsbyjs#10512)
  Update starters.yml (gatsbyjs#10505)
  chore(release): Publish
  fix(graphql-skip-limit): fix hasNextPage (gatsbyjs#10504)
  chore: use cjs instead of esm for consistency (gatsbyjs#10494)
  feat(gatsby-remark-copy-linked-files): add support for video elements with `src` attribute (gatsbyjs#10395)
  typofix (gatsbyjs#10488)
  Add kobit.in to showcase (gatsbyjs#10496)
  fix(docs): window.reload => window.location.reload (gatsbyjs#10459)

# Conflicts:
#	packages/gatsby/CHANGELOG.md
#	packages/gatsby/package.json
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug An issue or pull request relating to a bug in Gatsby

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'hasNextPage' in markdown-remark Not Working as Expected

3 participants