-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The current Paginate
API is quite frustrating, it's not user-friendly at all, especially when we use it for GraphQL, a lot of boilerplate codes. Suggesting converting it to iteration basic.
Proposed API :
result, err := db.Paginate(ctx, actions.Paginate())
if err != nil {
panic(err)
}
result.StartCursor()
result.EndCursor()
result.ForEach(func(v T) {})
result.HasNext()
result.HasPrev()
result.Before(ctx, cursor)
result.After(ctx, cursor)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request