IEvangelist/azure-cosmos-dotnet-repository

Add support for QueryRequestOption property ResponseContinuationTokenLimitInKb

victormarante opened this issue · 6 comments

Is your feature request related to a problem? Please describe.
Continuation tokens from Cosmos V3 SDK sometimes become too large for servers/browser agents too handle (either resulting in errors when receiving such a large item, or getting 414 URI too long). This issue happens when continuation token is part of route, but will also be an issue since it can be too large even for headers.

Describe the solution you'd like
QueryRequestOptions from the Cosmos SDK supports setting a continuation token limit. This would be helpful if it was exposed from this NuGet so we can control the size of the token in cases there it becomes to large

Hi there @victormarante - I like this proposal. Would you be interested in helping out, by providing a PR? I'm imagining that we could add an overload that exposes this to the various APIs where it's needed.

Hi! I can surely do so. I will look into your contribution guidelines and create a PR once I am done.

Noticed you don't have a contribution guideline, but I will do my best. A question on what direction you are thinking:

  1. As you suggested, go through all the API's and add an overload for the API's that may return a ContinuationToken, or
  2. Allow users to send in either QueryRequestOptions or sub-set of the options to all API's that utilizes it (which seems to be DefaultRepository.Paging.cs and DefaultRepository.Specs.cs

Not sure which approach you fancy, but the easier on (point 1), might be what I begin with and we'll go from there.

Yeah, I think the overload approach is the most straightforward (option 1). That seems similar to option 2, no? Wouldn't the overload accept a QueryRequestOptions?

@all-contributors please add @victormarante for issue and code