Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Pass the request context to the RelativeLinks generators #39

Open
rknLA opened this issue Nov 3, 2015 · 0 comments
Open

Pass the request context to the RelativeLinks generators #39

rknLA opened this issue Nov 3, 2015 · 0 comments

Comments

@rknLA
Copy link
Contributor

rknLA commented Nov 3, 2015

I'm not super confident in how the relative links generators are to begin with, but it's clear that they need a bit more for paginating search results (i.e. the search query parameters should stay the same, but the page or offset should change for the next or previous page).

Two ways of handling this come to mind:

  1. A QueryResult object that contains the original query, and thus can propagate the parameters to the link generator (and therefore also requires no changes to pale), or,
  2. Pull the parameters off of the context in the link generator itself, thus requiring the context.

This prompts a larger question around relative links in general - this is one of the places where there needs to be actual logic in the resource, which makes it more of a module than a manifest document, which feels counter to the spirit of the library in the first place. Another option there is to force the underlying model to provide the link data, which is then implicit in the resource definition..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant