mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(Shopify Node): Fix pagination when using options (#6972)
This commit is contained in:
parent
dd233bdf7d
commit
475d9c98e8
|
@ -64,6 +64,20 @@ export async function shopifyApiRequest(
|
|||
delete options.qs;
|
||||
}
|
||||
|
||||
// Only limit and fields are allowed for page_info links
|
||||
// https://shopify.dev/docs/api/usage/pagination-rest#limitations-and-considerations
|
||||
if (uri && uri.includes('page_info')) {
|
||||
options.qs = {};
|
||||
|
||||
if (query.limit) {
|
||||
options.qs.limit = query.limit;
|
||||
}
|
||||
|
||||
if (query.fields) {
|
||||
options.qs.fields = query.fields;
|
||||
}
|
||||
}
|
||||
|
||||
return this.helpers.requestWithAuthentication.call(this, credentialType, options, {
|
||||
oauth2: oAuth2Options,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue