Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@danielbachhuber
Copy link
Member

If we're at the end of a range, we'd still want our query navigation
headers

If we're at the end of a range, we'd still want our query navigation
headers
@danielbachhuber danielbachhuber added this to the 2.0 milestone Feb 18, 2015
@danielbachhuber
Copy link
Member Author

@WP-API/amigos #reviewmerge

@rachelbaker
Copy link
Member

Related #888 and #862

@rmccue Thoughts?

@rmccue
Copy link
Member

rmccue commented Feb 27, 2015

Hmm, looks OK to me. With this change, we should still see [] back from an endpoint, but now get the query nav headers too, which is nice. What happens if you're way over the page limit though? (page=999 with only 2 posts in the collection)

@danielbachhuber
Copy link
Member Author

What happens if you're way over the page limit though?

You'd still get query nav headers. I don't think that's unexpected

@rmccue
Copy link
Member

rmccue commented Feb 27, 2015

You'd still get query nav headers. I don't think that's unexpected

Right, but they'd link to ?page=998, which isn't where we should link IMO.

Here's what I'm thinking. We keep prev/next the same when you're on a page that "exists" (that is, the page is between 1 and max_num_pages). On all pages, link to rel=first and rel=last. This would ensure we never link to pages that don't exist, while still allowing navigation.

@danielbachhuber
Copy link
Member Author

Seems reasonable. I'll update when I have a moment.

@danielbachhuber
Copy link
Member Author

Will be handled in #1209

@danielbachhuber danielbachhuber deleted the dont-bail-early branch May 7, 2015 22:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants