Hi. I need to retrieve paginated records from the Shopify API. I have created a GraphQL query that takes an end_cursor as a parameter. The query works as expected.
I am calling this query from a Javascript Query but need to set the 'end_cursor' variable to fetch the next pages recursively.
The reason I need to do this is because I need to filter and transform the results once I have retrieved all the records (pages) from Shopify (GraphQL).
How can I access and set the variables from within a javascript query? I we can't do this, is there another way to achieve this?