Open no1seman opened 2 years ago
coerceInt, coerceLong, coerceFloat, coerceBoolean, coerceString - silenly returns nil if coesion failed:
nil
https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L263
https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L302
https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L346
Seems it wiil better to raise an error if coercion failed (to be discussed)
Also pay attention to this comment: https://github.com/tarantool/graphql/pull/55#discussion_r852604639
coerceInt, coerceLong, coerceFloat, coerceBoolean, coerceString - silenly returns
nil
if coesion failed:https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L263
https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L302
https://github.com/tarantool/graphql/blob/58b64a6672e4aa86a9d649bfd66a619948b31f2e/graphql/types.lua#L346
Seems it wiil better to raise an error if coercion failed (to be discussed)