When getting a list of folders (/files with a q param of: mimeType='application/vnd.google-apps.folder') the nextLink includes any maxResults param I've included, but does not include the q param, so when following the nextLink, non-folders are included in the results. If I try to add the q param to the nextLink, I get a 500 error.
How can I get the full list of folders most efficiently? Thanks.