This is my use case:
- I create a query for a set of products using a filter (i.e. with ProductsOperationQueryBuilder)
- I set PageInfo on the query and set the "first" argument to the page size I want (e.g. 100)
- I execute the query and check the results:
- if pageInfo.hasNextPage is true then I add an "after" argument to the same query instance, setting it to the pageInfo.endCursor value
- I execute this query instance again and repeat until pageInfo.hasNextPage is false
The issue is that repeated attempts to set the "after" argument fail with a "An item with the same key has already been added". It looks like this is because AddArgument in Query calls Add on a dictionary.
Could you maybe make AddArgument do an add/update rather than a straight Add on the dictionary?
Or is there another way to do this (without making a new query instance for each call)?
Thanks
PS- I also looked at configuring arguments with SetArguments(Action) but this also fundamentally uses IArgumentsBuilder so hits the same issue.
This is my use case:
The issue is that repeated attempts to set the "after" argument fail with a "An item with the same key has already been added". It looks like this is because AddArgument in Query calls Add on a dictionary.
Could you maybe make AddArgument do an add/update rather than a straight Add on the dictionary?
Or is there another way to do this (without making a new query instance for each call)?
Thanks
PS- I also looked at configuring arguments with SetArguments(Action) but this also fundamentally uses IArgumentsBuilder so hits the same issue.