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

relay style pagination #133

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ericsullivan
Copy link

@ericsullivan ericsullivan commented Aug 24, 2021

Relay Doc

resolves: #84

@ericsullivan
Copy link
Author

Was this PR acceptable? I didn't receive any feedback on it

@sgerrand
Copy link
Contributor

Hi @ericsullivan! Thank you for your contribution and apologies for the lack of response to it thus far. I'll review it for you now.

@sgerrand sgerrand self-assigned this Oct 22, 2021
Copy link
Contributor

@sgerrand sgerrand left a comment

Choose a reason for hiding this comment

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

The interface change looks fine to me, especially as this change is additive and should be backwards compatible. There's an open question inline in a test which needs to be resolved and removed before merging.

Comment on lines 37 to 38
# Question: Should this return a value?
# assert page.metadata.before == encode_cursor(%{charged_at: p5.charged_at, id: p5.id})
Copy link
Contributor

Choose a reason for hiding this comment

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

Is your question "should the page return information about a previous page in the initial page"? Some clarification would help me to answer it.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that was the question. If you're on the first page, before is nil. If a new record is added before the first page, you can't use the before to get to it. It feels like and edge case so I'm just going to remove the comment

test/paginator_test.exs Outdated Show resolved Hide resolved
@sgerrand
Copy link
Contributor

When you have a chance, would you please rebase your changes against main and push them.

@sgerrand
Copy link
Contributor

@ericsullivan, I've left some feedback for you and I'll wait on your response. I'll be available for review again later this week!

@sgerrand
Copy link
Contributor

sgerrand commented Nov 2, 2021

👋 @ericsullivan, are you still interested in making this change?

@ericsullivan
Copy link
Author

Sorry, for the delay. I just rebased and removed the comment

@matteing
Copy link

Hi. Any updates on this?

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

Successfully merging this pull request may close these issues.

Suggestion: Change metadata
3 participants