Defaulting the first param / paging by default
See original GitHub issueI have the following snippet:
def resolve_products(self, info, **kwargs):
return Product.objects.all()
I want to return 100 results by default. I notice that if I specify say first: 30 in my query
{ products (first: 30 ){} }
that first
appears in kwargs.
I then tried setting kwargs['first']
to 100
if no first key is found, but it has no effect.
How do I default first so all results do not get returned by default
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Set default page size for JPA Pageable Object - Stack Overflow
If you are talking about a Spring Data PagingAndSortingRepository you can set the default page size by using the @PageableDefault on a Controller...
Read more >Paging with Spring Boot - Reflectoring
With Spring Boot's configuration properties, we have fine-grained control over the defaults and parameter names. There are some potential ...
Read more >Controlling pagination - Guidewire Documentation
The pageSize values for a resource defaults to defaultPageSize=25 and maxPageSize=100 . Individual resources may override these values in the API's apiconfig.
Read more >Pagination - Django REST framework
Pagination is only performed automatically if you're using the generic views or viewsets. ... Defaults to the same value as the PAGE_SIZE settings...
Read more >Pagination - Hot Chocolate - ChilliCream GraphQL Platform
If we want to enforce consistent pagination defaults throughout our app, we can do so by setting the global PagingOptions . C#. public...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@muriloacs the easiest way that I’ve found to make this happen is to create a new connection field with an overridden
connection_resolver
. This is untested as I don’t need it right now but it should be about right.@gabelimon you can set a default value of a connection field like this: