-
Notifications
You must be signed in to change notification settings - Fork 70
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
Cursor based pagination #39
Conversation
@@ -5,17 +5,29 @@ import { RequestOptions } from "./types"; | |||
export class ApiClient { | |||
constructor(private authProvider: IAuthProvider, private apiBaseUrl: string) { } | |||
|
|||
public async issueGetRequest(path: string) { | |||
public async issueGetRequest(path: string, pageMode: boolean = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider creating a separate function for this specific logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tradeoff here is to duplicate same code as a result of resolveWithFullResponse: true
on line 17 and write GET func specific for page or edit all func's using issueGetRequest
and extract body, BTW requestPromise
lib deprecated, so we can fix it when we use any replacement lib.
@tomervil, what approach do u think we need to take here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i totally agree that isn't ideal at all, just a quick win
@yarinvak and i spoke offline and agreed not to break the SDK, as a result of different behavior on the API vs SDK |
No description provided.