Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QueryRequestOption property ResponseContinuationTokenLimitInKb #432

Open
victormarante opened this issue Apr 19, 2024 · 6 comments
Labels
help wanted Extra attention is needed up-for-grabs 🙏🏽 Happy to consider a pull review to address this issue

Comments

@victormarante
Copy link

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

@IEvangelist IEvangelist added up-for-grabs 🙏🏽 Happy to consider a pull review to address this issue help wanted Extra attention is needed labels Apr 19, 2024
@IEvangelist
Copy link
Owner

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.

@victormarante
Copy link
Author

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

@victormarante
Copy link
Author

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.

@IEvangelist
Copy link
Owner

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?

@IEvangelist
Copy link
Owner

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

Copy link
Contributor

@IEvangelist

I've put up a pull request to add @victormarante! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed up-for-grabs 🙏🏽 Happy to consider a pull review to address this issue
Projects
None yet
Development

No branches or pull requests

2 participants