Skip to content

Commit

Permalink
Release apollo-composition 0.1.4 (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-apollo authored Oct 1, 2024
2 parents c814e0e + ce2a2fe commit b82456b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 32 deletions.
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
executors:
arm_macos: &arm_macos_executor
macos:
xcode: "14.2"
xcode: "15.4.0"
resource_class: macos.m1.medium.gen1
environment:
RUSTUP_TARGET: "aarch64-apple-darwin"
Expand Down Expand Up @@ -172,13 +172,9 @@ commands:
condition:
equal: [ *arm_macos_executor, << parameters.platform >> ]
steps:
- run:
name: Skip homebrew update
command: echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $BASH_ENV
- run:
name: Install CMake
command: |
brew install cmake
command: brew install cmake

- install_rust_toolchain:
platform: << parameters.platform >>
Expand Down
17 changes: 12 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions apollo-composition/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.4

- Update to `apollo-federation` 2.0.0-preview.0

## 0.1.3

- [#586](https://github.com/apollographql/federation-rs/pull/586) Make
Expand Down
6 changes: 3 additions & 3 deletions apollo-composition/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-composition"
version = "0.1.3"
version = "0.1.4"
license = "Elastic-2.0"
edition = "2021"
authors = ["Apollo Developers <[email protected]>"]
Expand All @@ -9,7 +9,7 @@ readme = "README.md"
repository = "https://github.com/apollographql/federation-rs/"

[dependencies]
apollo-compiler = "1.0.0-beta.20"
apollo-federation = "2.0.0-alpha.7"
apollo-compiler = "1.0.0-beta.24"
apollo-federation = "2.0.0-preview.0"
apollo-federation-types = { version = "0.14.0", path = "../apollo-federation-types" }
either = "1.12.0"
33 changes: 15 additions & 18 deletions apollo-composition/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use apollo_compiler::parser::LineColumn;
use apollo_compiler::Schema;
use apollo_federation::sources::connect::expand::{expand_connectors, Connectors, ExpansionResult};
use apollo_federation::sources::connect::validation::{
validate, Code, Severity as ValidationSeverity,
Expand Down Expand Up @@ -71,23 +70,21 @@ pub trait HybridComposition {
let subgraph_validation_errors = subgraph_definitions
.iter()
.flat_map(|subgraph| {
// TODO: Use parse_and_validate (adding in directives as needed)
// TODO: Handle schema errors rather than relying on JavaScript to catch it later
let schema = Schema::parse(&subgraph.sdl, &subgraph.name)
.unwrap_or_else(|schema_with_errors| schema_with_errors.partial);
validate(schema).into_iter().map(|validation_error| Issue {
code: transform_code(validation_error.code),
message: validation_error.message,
locations: validation_error
.locations
.into_iter()
.map(|range| SubgraphLocation {
subgraph: Some(subgraph.name.clone()),
range: Some(range),
})
.collect(),
severity: validation_error.code.severity().into(),
})
validate(&subgraph.sdl, &subgraph.name)
.into_iter()
.map(|validation_error| Issue {
code: transform_code(validation_error.code),
message: validation_error.message,
locations: validation_error
.locations
.into_iter()
.map(|range| SubgraphLocation {
subgraph: Some(subgraph.name.clone()),
range: Some(range),
})
.collect(),
severity: validation_error.code.severity().into(),
})
})
.collect::<Vec<_>>();

Expand Down

0 comments on commit b82456b

Please sign in to comment.