Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The following are aliases you can use with "cargo command_name"
[alias]
"clippy:fix" = "clippy --all --fix --allow-dirty --allow-staged"
10 changes: 10 additions & 0 deletions .changeset/funny-rockets-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'hive-console-sdk-rs': patch
'hive-apollo-router-plugin': minor
---

Extract Hive Console integration implementation into a new package `hive-console-sdk` which can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also document here the internal changes to the LRU cache implementation, and also the refactor to reduce the Mutex count.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 👍

be used by any Rust library for Hive Console integration

It also includes a refactor to use less Mutexes like replacing `lru` + `Mutex` with the thread-safe `moka` package.
Only one place that handles queueing uses `Mutex` now.
5 changes: 5 additions & 0 deletions .changeset/six-teeth-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hive-apollo-router-plugin': patch
---

Fixes a bug when Persisted Operations are enabled by default which should be explicitly enabled
4 changes: 3 additions & 1 deletion .github/workflows/apollo-router-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- 'packages/libraries/router/**'
- 'packages/libraries/sdk-rs/**'
- 'docker/router.dockerfile'
- 'scripts/compress/**'
- 'configs/cargo/Cargo.lock'
Expand All @@ -16,6 +17,7 @@ on:
push:
paths:
- 'packages/libraries/router/**'
- 'packages/libraries/sdk-rs/**'
- 'docker/router.dockerfile'
- 'scripts/compress/**'
- 'configs/cargo/Cargo.lock'
Expand Down Expand Up @@ -60,7 +62,7 @@ jobs:
github_org="graphql-hive"
router_version=$(cargo tree -i apollo-router --quiet | head -n 1 | awk -F" v" '{print $2}')
plugin_version=$(jq -r '.version' packages/libraries/router/package.json)
has_changes=$(git diff HEAD~ HEAD --name-only -- 'packages/libraries/router/Cargo.toml' 'Cargo.lock' 'configs/cargo/Cargo.lock' 'packages/libraries/router/package.json')
has_changes=$(git diff HEAD~ HEAD --name-only -- 'packages/libraries/router/Cargo.toml' 'packages/libraries/router/package.json' 'packages/libraries/sdk-rs/Cargo.toml' 'packages/libraries/sdk-rs/package.json' 'Cargo.lock' 'configs/cargo/Cargo.lock')

if [ "$has_changes" ]; then
image_tag_version="router${router_version}-plugin${plugin_version}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Look for changes
id: rust_changed
run: |
lines=$( git diff HEAD~ HEAD --name-only -- 'packages/libraries/router' 'Cargo.toml' 'configs/cargo/Cargo.lock' | wc -l )
lines=$( git diff HEAD~ HEAD --name-only -- 'packages/libraries/router' 'packages/libraries/sdk-rs' 'Cargo.toml' 'configs/cargo/Cargo.lock' | wc -l )
if [ $lines -gt 0 ]; then
echo 'rust_changed=true' >> $GITHUB_OUTPUT
fi
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ jobs:
echo "crate_version=$VERSION" >> $GITHUB_OUTPUT
echo "crate_publish=true" >> $GITHUB_OUTPUT

- name: release hive-apollo-router-plugin to Crates.io
- name: release to Crates.io
if: steps.rust-crate.outputs.crate_publish == 'true'
run: |
cd packages/libraries/router
cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
cargo publish --allow-dirty --no-verify
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@
],
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}
}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
resolver = "2"
members = ["packages/libraries/router", "scripts/compress"]
members = ["packages/libraries/router", "scripts/compress", "packages/libraries/sdk-rs"]
Loading
Loading