apollo-compiler@0.9.2
goto-bus-stop
released this
23 May 11:32
·
427 commits
to main
since this release
Features
-
add
as_$type()
methods tohir::Value
, by goto-bus-stop in pull/564These methods simplify casting the
hir::Value
enum to single Rust types.
Added methods:hir::Value::as_i32() -> Option<i32>
hir::Value::as_f64() -> Option<f64>
hir::Value::as_str() -> Option<&str>
hir::Value::as_bool() -> Option<bool>
hir::Value::as_list() -> Option<&Vec<Value>>
hir::Value::as_object() -> Option<&Vec<(Name, Value)>>
hir::Value::as_variable() -> Option<&Variable>
Fixes
-
non-nullable variables should be accepted for nullable args, by lrlna in pull/565
Fixes several
null
-related issues from 0.9.0. -
add an
UndefinedVariable
diagnostic, by goto-bus-stop in pull/563Previously undefined variables were reported with an
UndefinedDefinition
diagnostic.
Splitting it up lets us provide a better error message for missing variables.