type Foo {
age: Int
name: String
stars: InvalidTypeTypo
}
type Query {
get_invalid: Foo
}
query GetInvalidTypedField {
get_invalid {
name
stars
}
}
While the InvalidTypeTypo error is detected, the query processor throws when it can't lookup the type, which crashes the tool, and the error is never reported.
More generally, the problem is that HaxeGenerator.hx is currently using a mix of both error(msg) and throw msg. Instead, it should standardize on error(), and always ensure those are reported, even when exceptions (expected or unexpected) occur.
The following test causes HaxeGenerator to throw:
While the
InvalidTypeTypo
error is detected, the query processor throws when it can't lookup the type, which crashes the tool, and the error is never reported.More generally, the problem is that
HaxeGenerator.hx
is currently using a mix of botherror(msg)
andthrow msg
. Instead, it should standardize onerror()
, and always ensure those are reported, even when exceptions (expected or unexpected) occur.