Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: rerouting limit with relationship fetching #115

Open
mannol opened this issue Jun 25, 2021 · 0 comments
Open

BUG: rerouting limit with relationship fetching #115

mannol opened this issue Jun 25, 2021 · 0 comments

Comments

@mannol
Copy link

mannol commented Jun 25, 2021

Hello.

Consider the following:

  • You have 3 resources C
  • Each C resource has 10 relationships R
  • Each R relationship has 10 relationships P

When you request /api/C?include=R.P to fetch all the data at once, the Handler's search method gets called. The search method then receives the following params:

{
  filter: {
    id: ['P_id1', ...] // we get all 100 id's here
  },
  page: {
    offset: 0,
    limit: 50, // you get whatever limit you have set by default
  }
}

If you implemented your search method to respect offset and limit params, you'd never be able to resolve those relationships. So what needs to be done is: jagql should implement paging while resolving relationships. That way, all possible scenarios are covered.

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

No branches or pull requests

1 participant