question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Take limit in ListOptions

See original GitHub issue

Is your feature request related to a problem? Please describe. When running a Vendure instance that contains many Products and ProductVariants, it is currently possible to query all products at once as there is no limit for the take input. This is obviously not desired as this can easily bring down the server.

Describe the solution you’d like Allow to define a limit and default value for the take variable in ListOptions and SearchInput.

Describe alternatives you’ve considered

  • Define a Custom Scalar with a maximum and default value.
  • Other options?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelbromleycommented, Mar 24, 2021

Got it, thanks for the explanation. One option to make the limit more explicit would be to throw a UserInputError when attempting to take too many.

0reactions
alex-dwtcommented, Aug 3, 2021

Thanks for a full description @michaelbromley Initially I’ve read the text in the 1st message:

Describe the solution you’d like Allow to define a limit and default value for the take variable in ListOptions and SearchInput.

And because of SearchInput I decided that you are going to improve search_query also, and start thinking that you probably missed this -) PS. But maybe it makes some sense to “protect” search_query also, or maybe not, anyway I agree it’s not so important now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Limit List Options - Google Cloud Community
I'm trying to figure out a way to limit options in column 2 based and answer given in column 1. Think of it...
Read more >
ListOptions (Fabric8 :: Kubernetes Model 4.6.4 API) - javadoc.io
@Generated(value="org.jsonschema2pojo") public class ListOptions extends Object ... No args constructor for use in serialization ... Returns: The limit ...
Read more >
Directory Lists and ListOptions - ProFTPD
The ListOptions directive of ProFTPD can be used to control how directory ... and yet still apply limits, to keep the recursion from...
Read more >
go - Tests fail when trying to list kubernetes CRD objects using ...
When testing, I add 25 objects to a fake client then call the list function with a Limit of 10: opts := client.ListOptions{...
Read more >
limit list options available in field B once the list field A is set.
You didn't say you wanted multi-select earlier. Cascading select won't do that, so yes, use the scripts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found