You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nozzlegear
Latest release V5.0.3
When using fields on the filter, the nextPageFilter encodes ',' as %2C, this results in the next page results pulling through with no fields selected.
For now i'm having to use your first code snippet of usage rather than the new suggested approach.
// bug with fields being encoded by shopify
newFilter.Fields = newFilter.Fields.Replace("%2C", ",");
See encoding issue:
See code i've used which works in production right now based upon your first iteration of recommended usage:
`
var hasNextPageResults = true;
var page = 1;
while (hasNextPageResults)
{
ListResult<Order> result = await service.ListAsync(listFilter);
Console.WriteLine($"Received page {page}");
if (result.LinkHeader?.NextLink != null)
{
var newFilter = result.LinkHeader.NextLink.GetFollowingPageFilter();
// NOTE: For now, you must set the limit and fields property for further page filters manually.
newFilter.Limit = filter.Limit;
// Set the filter to the following page filter, which will grab the next page.
// Failure to do this will result in an infinite loop as the Shopify API returns the first page over and over
// bug with fields being encoded by shopify
newFilter.Fields = newFilter.Fields.Replace("%2C", ",");
listFilter = newFilter;
}
else
{
hasNextPageResults = false;
}
items.AddRange(result.Items);
if (items.Count > maxOrdersToReturn)
hasNextPageResults = false;
page++;
}`
The text was updated successfully, but these errors were encountered:
@nozzlegear
Latest release V5.0.3
When using fields on the filter, the nextPageFilter encodes ',' as %2C, this results in the next page results pulling through with no fields selected.
For now i'm having to use your first code snippet of usage rather than the new suggested approach.
// bug with fields being encoded by shopify
newFilter.Fields = newFilter.Fields.Replace("%2C", ",");
See encoding issue:
![image](https://user-images.githubusercontent.com/34938196/75828356-8de6ff80-5da3-11ea-9bb4-286dcc25eb71.png)
See code i've used which works in production right now based upon your first iteration of recommended usage:
`
var hasNextPageResults = true;
var page = 1;
The text was updated successfully, but these errors were encountered: