You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GraphQL Boolean argument values are dropped (always null) and Float values are typed as String #6383
Two GraphQL scalar argument types are mis-converted before reaching SQL. BooleanValue.getValue() always returns null (the parsed literal is discarded), and FloatValue.getValue() returns the raw String image instead of a number. Both corrupt the generated SQL: boolean filters compare against null, float filters compare against a quoted string.
protectedbooleanval; // set by the parser: GraphQLParser sets jjtn000.val = true/false@OverridepublicObjectgetValue() { returnnull; } // <-- val discarded
protectedStringstringValue;
@OverridepublicObjectgetValue() { returnstringValue; } // raw image "1.5", not a number
Contrast IntValue.getValue(), which correctly returns the parsed int. (The parser even carries a //TODO parse! for the float at GraphQLParser.java:3173.)
Consumers: GraphQLSchema.executeQuery reads ...getValue().getValue() (L155) to build the WHERE (L160-172), and GraphQLSchema.getArguments (L239-244) binds @sql-directive params.
{ books(inStock: true) { title } } → generated SQL select from Book where inStock = null (argValue is null; the instanceof String branch is skipped and null is concatenated). Every boolean filter is silently neutralized — including one meant to restrict visibility (where published = true).
{ books(rating: 4.5) { title } } → because argValue instanceof String is now true, the value is quoted: select from Book where rating = "4.5" — a numeric property compared to a string literal → empty/incorrect results.
Native-directive path binds flag = null / rating = "4.5" into the SQL param map the same way.
Suggested fix
BooleanValue.getValue() → return val;. FloatValue.getValue() → parse to a numeric type, e.g. return new BigDecimal(stringValue); (matching IntValue).
Scope / confidence
High confidence — the literal-set-then-discard and the string return are unambiguous, and both call paths are verified. Affects only schemas that declare Boolean/Float arguments.
Activity
fix(#6391, #6386, #6387, #6384, #6383): vector sparse/ANN guards, app…
lvca commentedon Aug 19, 2026
Fixed in #6451 (merged).