-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Incorrect pagination behaviour when using the library in Electron (Specifically renderer process) #385
Comments
Hint: |
That is very very odd. Ill give it a look soonish, hopefully its something small! |
That was just test. With or without, it did not change the |
So i tested the pagination with labels and it seems to work. Ill check pipelines directly and see if anything sticks out there :( You are awaiting for the promise to complete right? |
If you get the chance, could you check that you get the same results when getting all the labels through the labels api |
First: sorry I could not do this earlier, but I could not afford to lose more time on this at work ... I made some tests to isolate the problem, and when I run the code from the CLI, it works as expected. So it seems Electron is the cause of the problem here ; I suppose this issue can be closed to open a more general one "Does not work in Electron", but I have to admit I ended up using direct HTTP calls to the API, so I'm out. nb: I think the download of artifacts is problematic too, btw. Big thanks for that project anyway! |
No worries! I appreciate the extra investigation :) |
I'm also having problems in Electron. Only getting 20 results from the |
@alaincao @jdalrymple Just found that it does work properly if the api calls are done on the main electron process, and not the renderer process (how-to on this demonstrated here https://ourcodeworld.com/articles/read/537/how-to-execute-a-function-of-the-main-process-inside-the-renderer-process-in-electron-framework). Would be nice if it worked either way though. EDIT: this is probably a better reference https://github.com/electron/electron/blob/master/docs/api/ipc-main.md |
I wonder what would make the difference :/ |
Does the problem still occur? @Helam24 |
@jdalrymple I’m not sure. I’m not working on that project at the moment. I ended up moving all the relevant calls to the main process instead of the renderer process which is probably better anyway, just a little more work. Were changes made that might’ve fixed the issue? |
Nothing specific, though since then we've released a browser specific version and cleaned up alot of the logic. |
Closing for the time being. I'll reopen if the problem is encountered again! |
Description
I am currently trying to upgrade a project from v4.2.7 (which is still working fine with this version today) to v8.0.0 (and now v9.0.0) and I have problems with pagination.
I am obviously doing something wrong, but I really can't see what ...
I noticed that the default behaviour for all
api.XXX.all()
with no parameter now is to returns only 20 rows. That seem to contradict what's been said in #94, first comment: "We changed it in the past to not just return 30 results since it was misleading. 30 != all lol" and the documentation inReadme.md
: "For any .all() function on a resource, it will return all the items from Gitlab".Ok, but now the strange thing is if I add
{ showPagination:true }
in the requests, all the pagination info I get are invariablyundefined
.This happens with whatever parameters I put in as parameters (page/perPage/etc.).
Also,
perPage
seem to be respected, but I can't get more than 100 rows returned. There seem to be a max somewhere.Steps to reproduce / Actual behaviour

Expected behaviour
.all()
should return all rows.Possible fixes
Sorry, 'can't help here ...
The text was updated successfully, but these errors were encountered: