mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Shopify Node): Fix pagination when using options (#6972)
This commit is contained in:
@@ -64,6 +64,20 @@ export async function shopifyApiRequest(
|
|||||||
delete options.qs;
|
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, {
|
return this.helpers.requestWithAuthentication.call(this, credentialType, options, {
|
||||||
oauth2: oAuth2Options,
|
oauth2: oAuth2Options,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user