From 980d47a4ee22455f664e64dc3943acd3febce540 Mon Sep 17 00:00:00 2001 From: Irina Shestak Date: Tue, 16 Aug 2022 07:49:32 -0600 Subject: [PATCH] apollo-compiler@0.2.0 (#284) --- crates/apollo-compiler/CHANGELOG.md | 70 +++++++++++++++++++++++++++++ crates/apollo-compiler/Cargo.toml | 2 +- crates/apollo-compiler/README.md | 2 +- crates/apollo-parser/CHANGELOG.md | 2 +- 4 files changed, 73 insertions(+), 3 deletions(-) diff --git a/crates/apollo-compiler/CHANGELOG.md b/crates/apollo-compiler/CHANGELOG.md index 1e00499e5..3d6b0307d 100644 --- a/crates/apollo-compiler/CHANGELOG.md +++ b/crates/apollo-compiler/CHANGELOG.md @@ -17,6 +17,76 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## Maintenance ## Documentation --> +# [0.2.0](https://crates.io/crates/apollo-compiler/0.2.0) - 2022-08-16 + +## Breaking +- **inline_fragment().type_condition() returns Option<&str> - [lrlna], [pull/282]** + + Instead of returning `Option<&String>`, we now return `Option<&str>` + + [lrlna]: https://github.com/lrlna + [pull/272]: https://github.com/apollographql/apollo-rs/pull/282 + +- **Value -> DefaultValue for default_value fields - [lrlna], [pull/276]** + + default_value getters in Input Value Definitions and Variable Definitions now + return `DefaultValue` type. This is a type alias to Value, and makes it + consistent with the GraphQL spec. + + [lrlna]: https://github.com/lrlna + [pull/276]: https://github.com/apollographql/apollo-rs/pull/276 + +## Fixes +- **add type information to inline fragments - [lrlna], [pull/282], [issue/280]** + + Inline fragments were missing type correct type information. We now search for + applicable type's fields if a type condition exists, otherwise infer + information from the current type in scope ([as per spec](https://spec.graphql.org/October2021/#sel-GAFbfJABAB_F3kG )) + .Inline fragments + + [lrlna]: https://github.com/lrlna + [pull/282]: https://github.com/apollographql/apollo-rs/pull/282 + [issue/280]: https://github.com/apollographql/apollo-rs/issues/280 + +- **fix cycle error in fragment spreads referencing fragments - [lrlna], [pull/283], [issue/281]** + + Because fragment definitions can have fragment spreads, we are running into a + self-referential cycle when searching for a fragment definition to get its id. + Instead, search for the fragment definition when getting a fragment in a + fragment spread in the wrapper API. + + [lrlna]: https://github.com/lrlna + [pull/283]: https://github.com/apollographql/apollo-rs/pull/283 + [issue/281]: https://github.com/apollographql/apollo-rs/issues/281 + +## Features +- **pub use ApolloDiagnostic - [EverlastingBugstopper], [pull/268]** + + Exports ApolloDiagnostic to allow users to use it in other contexts. + + [EverlastingBugstopper]: https://github.com/EverlastingBugstopper + [pull/268]: https://github.com/apollographql/apollo-rs/pull/268 + +- **default_value getter in input_value_definition - [lrlna], [pull/273]** + + A getter for default values in input value definitions. + + [lrlna]: https://github.com/lrlna + [pull/273]: https://github.com/apollographql/apollo-rs/pull/273 + +- **feat(compiler): add db.find_union_by_name() - [lrlna], [pull/272]** + + Allows to query unions in the database. + + [lrlna]: https://github.com/lrlna + [pull/272]: https://github.com/apollographql/apollo-rs/pull/272 + +- **adds inline_fragments getter to SelectionSet - [lrlna], [pull/282]** + + Convenience method to get all inline fragments in the current selection set. + + [lrlna]: https://github.com/lrlna + [pull/282]: https://github.com/apollographql/apollo-rs/pull/282 # [0.1.0](https://crates.io/crates/apollo-compiler/0.1.0) - 2022-07-27 diff --git a/crates/apollo-compiler/Cargo.toml b/crates/apollo-compiler/Cargo.toml index 9a952ad2b..6998abd5d 100644 --- a/crates/apollo-compiler/Cargo.toml +++ b/crates/apollo-compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "apollo-compiler" -version = "0.1.0" +version = "0.2.0" 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 5258b9f9a..9f31a20d6 100644 --- a/crates/apollo-compiler/README.md +++ b/crates/apollo-compiler/README.md @@ -27,7 +27,7 @@ Add this to your `Cargo.toml` to start using `apollo-compiler`: ```toml # Just an example, change to the necessary package version. [dependencies] -apollo-compiler= "0.2.8" +apollo-compiler= "0.2.0" ``` Or using [cargo-edit]: diff --git a/crates/apollo-parser/CHANGELOG.md b/crates/apollo-parser/CHANGELOG.md index 6b9bde080..7986e00ca 100644 --- a/crates/apollo-parser/CHANGELOG.md +++ b/crates/apollo-parser/CHANGELOG.md @@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # [0.2.9](https://crates.io/crates/apollo-parser/0.2.9) - 2022-07-27 ## Features -- **Provide APIs for SyntaxNode and SyntaxNodePtr - [lrlna], [pull/251] +- **Provide APIs for SyntaxNode and SyntaxNodePtr - [lrlna], [pull/251]** Export a wrapper around SyntaxNodePtr provided by `rowan`. This allows access to pointers of the AST created by `apollo-parser`.