subql icon indicating copy to clipboard operation
subql copied to clipboard

Store methods implicit behaviour

Open stwiname opened this issue 5 months ago • 0 comments

Description

Some store methods have paging and limit responses to 100 items by default. This can be adjusted with the --query-limit flag. But the interface of these functions has default values and can easily start running into problems when >100 items are in the results and data starts missing.

Possible solutions

This is probably going to require a breaking change but it would be a minimal change.

  • Update the return type to indicate whether there are more entries
  • Update the parameters to make the limit a required parameter and throw if the limit is greater than the query limit. There would need to be a way to get the query limit in the handers, either from the error or an injected variable

stwiname avatar Sep 19 '24 21:09 stwiname