-
Notifications
You must be signed in to change notification settings - Fork 181
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
What are the constrains on the slice passed to connectionFromArraySlice? #81
Comments
I'm not really sure I understand what you're asking here, although I see you followed up with #82. Perhaps we should discuss there instead? |
Sorry wrote that before going to bed... It is not specifically related to #82. My point is that connectionFromArraySlice expects a slice that contains the elements it needs to populate the page. But you cannot know what those elements are without first going through the pagination algorithm. And right now the pagination algorithm is implemented directly in connectionFromArraySlice (vs factored out in its own function). This leaves with 2 options when constructing the slice to pass to connectionFromArraySlice:
Is this clearer? If yes, happy to factor out this pagination algorithm (for a bounded array) into its own function :) |
Hello guys!
It seems to me than to pass a valid slice to connectionFromArraySlice you basically need to know the start offset and end offset to make the slice bigger. Do you agree?
If yes, I'm happy to extract this piece into its own function and add tests :)
Cheers
The text was updated successfully, but these errors were encountered: