-
Notifications
You must be signed in to change notification settings - Fork 312
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
DataBinder using default auto grow collection limit #392
Comments
Thanks for raising this issue! On the Spring Boot side, we might create a new configuration property to make things easier to configure. |
Thanks for getting back on this @bclozel I agree, staying decoupled from the web specific support and allowing consumption of the For a sensible default - 512 or 1024 seem large enough without allowing developers to shoot themselves in the foot. |
How do I actually use this? I don't see anything in the documentation. I've tried setting the dataBinder in various ways to get above 1024 limit but nothing seems to stick. :/ |
You can set a |
What is the proper way to get access to the AnnotatedControllerConfigurer to do that? I haven't had to use that before and what I've tried thus far hasn't worked. Thanks for the response, appreciate it. |
So I tried:
which is called, but does not seem to affect the limit. I.e., same error with more than 1024 items. I did end up working around the issue for better/worse. My mutation input object is along the lines of:
if I remove the @NoArgsConstructor it seems the use the all args constructor and skips the limit checking all together, which will work for us. Unclear why the setting of the dataBinder above wasn't doing the trick, I'm assuming I was doing the databinding setAutoGrow wrong. |
In a Spring Boot application, you could replace the bean completely by declaring it in your configuration:
I believe that your first attempt was trying to post process an existing bean. You can do that with:
and then declare that |
Hi,
My team has run into an issue with sending GraphQL requests with lists with greater than 256 elements over HTTP. This is occurring when the list is either directly in the query, or sent as a variable.
I think from my investigation that this is due to using the default DataBinder limit
DataBinder.DEFAULT_AUTO_GROW_COLLECTION_LIMIT
as we simply construct a normal DataBinder instance here:spring-graphql/spring-graphql/src/main/java/org/springframework/graphql/data/GraphQlArgumentBinder.java
Line 124 in a9e4324
I would have expected a more generous default, the ability to configure the property, or inject a different instance.
This is my first issue I've reported here so apologies if I've made any mistakes or need to change the issue - thanks!
The text was updated successfully, but these errors were encountered: