smallrye-graphql
                                
                                 smallrye-graphql copied to clipboard
                                
                                    smallrye-graphql copied to clipboard
                            
                            
                            
                        OptionalInt (and Long/Double) should be supported
It would be nice if OptionalInt (and OptionalLong/OptionalDoulble) were also supported.
I was under the impression that they are ?!? At least there are this : https://github.com/smallrye/smallrye-graphql/blob/910d920003c6a564478ddfcaf00fa747a97421e9/server/implementation/src/main/java/io/smallrye/graphql/scalar/number/IntegerScalar.java#L39
You you have a test case where this fails ?
Sorry, you are right! Maybe I had used an older version or something.
Found an error: those Optionals doesn't work as input types. The schema is generated correctly, but an error is thrown at runtime
GrpahQL-API:
@Query
public OptionalInt optionalInt(OptionalInt optionalInt) {
    return optionalInt;
}
Query:
query {
  optionalInt(optionalInt: 5)
}
SRGQL012000: Data Fetching Error: graphql.schema.CoercingParseLiteralException: SRGQL000015: Expected AST type 'IntValue' or 'StringValue' but was 'Integer'.
        at io.smallrye.graphql.scalar.number.NumberCoercing.parseLiteral(NumberCoercing.java:100)
        at io.smallrye.graphql.execution.datafetcher.helper.ArgumentHelper.correctObjectClass(ArgumentHelper.java:239)
        at io.smallrye.graphql.execution.datafetcher.helper.ArgumentHelper.afterRecursiveTransform(ArgumentHelper.java:216)
        at io.smallrye.graphql.execution.datafetcher.helper.AbstractHelper.recursiveTransform(AbstractHelper.java:82)
        at io.smallrye.graphql.execution.datafetcher.helper.ArgumentHelper.getArgument(ArgumentHelper.java:113)
        at io.smallrye.graphql.execution.datafetcher.helper.ArgumentHelper.getArguments(ArgumentHelper.java:70)
        at io.smallrye.graphql.execution.datafetcher.helper.ArgumentHelper.getArguments(ArgumentHelper.java:63)
        ...
The problem mentioned by @ybroeker is now fixed via https://github.com/smallrye/smallrye-graphql/pull/1731