From aa41b306818f113937f2c966f04ed8d83e71506d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e?= Date: Tue, 23 May 2023 12:31:40 +0100 Subject: [PATCH] apollo-compiler@0.9.2 (#566) --- crates/apollo-compiler/CHANGELOG.md | 34 +++++++++++++++++++++++++++++ crates/apollo-compiler/Cargo.toml | 2 +- crates/apollo-compiler/README.md | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/crates/apollo-compiler/CHANGELOG.md b/crates/apollo-compiler/CHANGELOG.md index 821c7b386..499831254 100644 --- a/crates/apollo-compiler/CHANGELOG.md +++ b/crates/apollo-compiler/CHANGELOG.md @@ -16,6 +16,40 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## Maintenance ## Documentation --> +# [0.9.2](https://crates.io/crates/apollo-compiler/0.9.2) - 2023-05-23 + +## Features +- add `as_$type()` methods to `hir::Value`, by [goto-bus-stop] in [pull/564] + + These methods simplify casting the `hir::Value` enum to single Rust types. + Added methods: + + - `hir::Value::as_i32() -> Option` + - `hir::Value::as_f64() -> Option` + - `hir::Value::as_str() -> Option<&str>` + - `hir::Value::as_bool() -> Option` + - `hir::Value::as_list() -> Option<&Vec>` + - `hir::Value::as_object() -> Option<&Vec<(Name, Value)>>` + - `hir::Value::as_variable() -> Option<&Variable>` + +[goto-bus-stop]: https://github.com/goto-bus-stop +[pull/564]: https://github.com/apollographql/apollo-rs/pull/564 + +## 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/563] + + Previously undefined variables were reported with an `UndefinedDefinition` diagnostic. + Splitting it up lets us provide a better error message for missing variables. + +[goto-bus-stop]: https://github.com/goto-bus-stop +[lrlna]: https://github.com/lrlna +[pull/563]: https://github.com/apollographql/apollo-rs/pull/563 +[pull/565]: https://github.com/apollographql/apollo-rs/pull/565 + # [0.9.1](https://crates.io/crates/apollo-compiler/0.9.1) - 2023-05-19 ## Fixes diff --git a/crates/apollo-compiler/Cargo.toml b/crates/apollo-compiler/Cargo.toml index b90007340..80b106ea3 100644 --- a/crates/apollo-compiler/Cargo.toml +++ b/crates/apollo-compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-compiler" -version = "0.9.1" +version = "0.9.2" authors = ["Irina Shestak "] license = "MIT OR Apache-2.0" repository = "https://github.com/apollographql/apollo-rs" diff --git a/crates/apollo-compiler/README.md b/crates/apollo-compiler/README.md index 0a0bb2bbf..be9d4e4ec 100644 --- a/crates/apollo-compiler/README.md +++ b/crates/apollo-compiler/README.md @@ -33,7 +33,7 @@ Or add this to your `Cargo.toml` for a manual installation: ```toml # Just an example, change to the necessary package version. [dependencies] -apollo-compiler = "0.9.1" +apollo-compiler = "0.9.2" ``` ## Rust versions