-
Notifications
You must be signed in to change notification settings - Fork 40
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 Test case for ArrayTypes when using @DefaultValues #283
Comments
This is an interesting issue. From looking at https://stackoverflow.com/questions/37167628/defaultvalue-for-a-list it seems that the JAX-RS community has not figured out a good answer for this either. The difference is that they have There are a few different ways to solve it (introducing the GraphQL equivalent of ParamConverters, making @phillip-kruger @t1 @thejibz @jefrajames what do you all think? |
The What about list of list of list ? i.e in graphql (Speaking of that, it reminds me that I have to raise an issue in the smallrye-graphql-server regarding the processing of field with type like |
LGTM. Maybe just use
|
I think we'd want to leave it as String[] to be consistent with the current
+1 |
Thanks for the lively discussion everyone, what I got so far from the discussion is:
I'll monitor this thread and try to provide a pull request over the weekend if we find consensus here - if your ok with it. :-) (one more thing.. can one elaborate briefly on the value vs values definition - I haven't had the time (yet) to look deeper into the code base but it seems this is an graphql specific behaviour on how you internally handle your annotations correct? Have a great day everyone. |
I thought |
@phillip-kruger : if im not mistaken i tried the following :
receiving an
so it doesn't seem to work. |
Ok, so let's look into that. As json should work, so this is a bug then :) We can add a test in the TCK to test json array of string. As far as I remember there is a basic (scalar) type, and there is a json complex type test. So this will be a good addition. |
Also this seems to be a bug in smallrye. So let's open the bug there and fix it there. (We can add the test to the TCK after that.) |
Hey @janknobloch |
@phillip-kruger, sweet, let me see if I can provide the proper test-cases on the weekend. :-) |
We can just use the once in SmallRye, just move it up to MP |
Alright so we can close this ? Feel free to close this issue. |
We can keep it open as a reminder to move the test case up at some point |
@janknobloch - B.t.w, what runtime are you using ? |
Not at my desk anymore but i think I was using openjdk11. - let me verify tmr morning. Why ? |
I mean are you using Open liberty or Quarkus ? Just so we can tell you when and what version will contain the fix. For Quarkus it should be in 1.7 that is out next week and Open Liberty the upcoming version, @andymc12 will have more details |
Ah sorry - I’m running Quarkus 1.6.1. 😊. thanks also for keeping me up to date - I made a workaround for now so no rush😉 But @phillip-kruger I guess I found another issue with your very nice Graphql-quarkus-extension. Getting some NPE during schema genaeration only in conjunction when using the open-api extension and having a hard time to narrow down the cause of this error. I’ll open an issue for this at the quarkus repo and would really appreciate some input sooner or later. Have a great evening / morning everyone. |
Ok great. So this issue will be sorted in 1.7.0.Final. W.r.t the other issue, yes log a issue and if you have a reproducer, even better. Also try with 1.7.0.CR2 just for in case. |
I will thanks! I’ll keep u posted. And thanks everyone for your contributions. |
Hey,
i hope im not missing anything but i have not found any specifics on @DefaultValues to be expanded for String[].
I think it would be nice to be consistent and being able to set default values for String arrays similar to the existing @DefaultValue approach:
public retType methodName(@Name("myVar") @DefaultValue("123") long myVar)
analog:
public retType methodName(@Name("myVars") @DefaultValues(values = {"123", "345"}) String[] myVars)
adding an additional annotation
@DefaultValues
could solve this issue easily as per example:The text was updated successfully, but these errors were encountered: