Skip to content

Commit 972a341

Browse files
chore(release): router crates and artifacts
1 parent ecb9b07 commit 972a341

File tree

11 files changed

+195
-78
lines changed

11 files changed

+195
-78
lines changed

.changeset/authz-directives.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

.changeset/shared_utilities_to_handle_vrl_expressions.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/router/CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
116116
### Other
117117

118118
- *(deps)* update release-plz/action action to v0.5.113 ([#389](https://github.com/graphql-hive/router/pull/389))
119+
## 0.0.20 (2025-11-21)
120+
121+
### Features
122+
123+
- support authenticated and requiresScopes directives (#538)
124+
125+
#### Directive-Based Authorization
126+
127+
Introducing directive-based authorization. This allows you to enforce fine-grained access control directly from your subgraph schemas using the `@authenticated` and `@requiresScopes` directives.
128+
129+
This new authorization layer runs before the query planner, ensuring that unauthorized requests are handled efficiently without reaching your subgraphs.
130+
131+
#### Configuration
132+
133+
You can configure how the router handles unauthorized requests with two modes:
134+
135+
- **`filter`** (default): Silently removes any fields the user is not authorized to see from the query. The response will contain `null` for the removed fields and an error in the `errors` array.
136+
- **`reject`**: Rejects the entire GraphQL operation if it requests any field the user is not authorized to access.
137+
138+
To configure this, add the following to your `router.yaml` configuration file:
139+
140+
```yaml
141+
authentication:
142+
directives:
143+
unauthorized:
144+
# "filter" (default): Removes unauthorized fields from the query and returns errors.
145+
# "reject": Rejects the entire request if any unauthorized field is requested.
146+
mode: reject
147+
```
148+
149+
If this section is omitted, the router will use `filter` mode by default.
150+
151+
#### JWT Scope Requirements
152+
153+
When using the `@requiresScopes` directive, the router expects the user's granted scopes to be present in the JWT payload. The scopes should be in an array of strings or a string (scopes separated by space), within a claim named `scope`.
154+
155+
Here is an example of a JWT payload with the correct format:
156+
157+
```json
158+
{
159+
"sub": "user-123",
160+
"scope": [
161+
"read:products",
162+
"write:reviews"
163+
],
164+
"iat": 1516239022
165+
}
166+
```
167+
168+
#### Breaking
169+
170+
Removed `pool_idle_timeout_seconds` from `traffic_shaping`, instead use `pool_idle_timeout` with duration format.
171+
172+
```diff
173+
traffic_shaping:
174+
- pool_idle_timeout_seconds: 30
175+
+ pool_idle_timeout: 30s
176+
```
177+
178+
##540 by @ardatan
179+
119180
## 0.0.19 (2025-11-19)
120181

121182
### Features

bin/router/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hive-router"
3-
version = "0.0.19"
3+
version = "0.0.20"
44
edition = "2021"
55
description = "GraphQL router/gateway for Federation"
66
license = "MIT"
@@ -16,9 +16,9 @@ name = "hive_router"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
hive-router-query-planner = { path = "../../lib/query-planner", version = "2.0.2" }
20-
hive-router-plan-executor = { path = "../../lib/executor", version = "6.0.1" }
21-
hive-router-config = { path = "../../lib/router-config", version = "0.0.11" }
19+
hive-router-query-planner = { path = "../../lib/query-planner", version = "2.1.0" }
20+
hive-router-plan-executor = { path = "../../lib/executor", version = "6.1.0" }
21+
hive-router-config = { path = "../../lib/router-config", version = "0.0.12" }
2222

2323
tokio = { workspace = true }
2424
futures = { workspace = true }

lib/executor/CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9494
### Other
9595

9696
- *(deps)* update release-plz/action action to v0.5.113 ([#389](https://github.com/graphql-hive/router/pull/389))
97+
## 6.1.0 (2025-11-21)
98+
99+
### Features
100+
101+
#### Directive-Based Authorization
102+
103+
Introducing directive-based authorization. This allows you to enforce fine-grained access control directly from your subgraph schemas using the `@authenticated` and `@requiresScopes` directives.
104+
105+
This new authorization layer runs before the query planner, ensuring that unauthorized requests are handled efficiently without reaching your subgraphs.
106+
107+
#### Configuration
108+
109+
You can configure how the router handles unauthorized requests with two modes:
110+
111+
- **`filter`** (default): Silently removes any fields the user is not authorized to see from the query. The response will contain `null` for the removed fields and an error in the `errors` array.
112+
- **`reject`**: Rejects the entire GraphQL operation if it requests any field the user is not authorized to access.
113+
114+
To configure this, add the following to your `router.yaml` configuration file:
115+
116+
```yaml
117+
authentication:
118+
directives:
119+
unauthorized:
120+
# "filter" (default): Removes unauthorized fields from the query and returns errors.
121+
# "reject": Rejects the entire request if any unauthorized field is requested.
122+
mode: reject
123+
```
124+
125+
If this section is omitted, the router will use `filter` mode by default.
126+
127+
#### JWT Scope Requirements
128+
129+
When using the `@requiresScopes` directive, the router expects the user's granted scopes to be present in the JWT payload. The scopes should be in an array of strings or a string (scopes separated by space), within a claim named `scope`.
130+
131+
Here is an example of a JWT payload with the correct format:
132+
133+
```json
134+
{
135+
"sub": "user-123",
136+
"scope": [
137+
"read:products",
138+
"write:reviews"
139+
],
140+
"iat": 1516239022
141+
}
142+
```
143+
144+
#### Breaking
145+
146+
Removed `pool_idle_timeout_seconds` from `traffic_shaping`, instead use `pool_idle_timeout` with duration format.
147+
148+
```diff
149+
traffic_shaping:
150+
- pool_idle_timeout_seconds: 30
151+
+ pool_idle_timeout: 30s
152+
```
153+
154+
##540 by @ardatan
155+
97156
## 6.0.1 (2025-11-04)
98157

99158
### Fixes

lib/executor/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hive-router-plan-executor"
3-
version = "6.0.1"
3+
version = "6.1.0"
44
edition = "2021"
55
description = "GraphQL query planner executor for Federation specification"
66
license = "MIT"
@@ -12,8 +12,8 @@ authors = ["The Guild"]
1212
[lib]
1313

1414
[dependencies]
15-
hive-router-query-planner = { path = "../query-planner", version = "2.0.2" }
16-
hive-router-config = { path = "../router-config", version = "0.0.11" }
15+
hive-router-query-planner = { path = "../query-planner", version = "2.1.0" }
16+
hive-router-config = { path = "../router-config", version = "0.0.12" }
1717

1818
graphql-parser = { workspace = true }
1919
graphql-tools = { workspace = true }

lib/query-planner/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
### Other
3131

3232
- *(deps)* update release-plz/action action to v0.5.113 ([#389](https://github.com/graphql-hive/router/pull/389))
33+
## 2.1.0 (2025-11-21)
34+
35+
### Features
36+
37+
#### Directive-Based Authorization
38+
39+
Introducing directive-based authorization. This allows you to enforce fine-grained access control directly from your subgraph schemas using the `@authenticated` and `@requiresScopes` directives.
40+
41+
This new authorization layer runs before the query planner, ensuring that unauthorized requests are handled efficiently without reaching your subgraphs.
42+
43+
#### Configuration
44+
45+
You can configure how the router handles unauthorized requests with two modes:
46+
47+
- **`filter`** (default): Silently removes any fields the user is not authorized to see from the query. The response will contain `null` for the removed fields and an error in the `errors` array.
48+
- **`reject`**: Rejects the entire GraphQL operation if it requests any field the user is not authorized to access.
49+
50+
To configure this, add the following to your `router.yaml` configuration file:
51+
52+
```yaml
53+
authentication:
54+
directives:
55+
unauthorized:
56+
# "filter" (default): Removes unauthorized fields from the query and returns errors.
57+
# "reject": Rejects the entire request if any unauthorized field is requested.
58+
mode: reject
59+
```
60+
61+
If this section is omitted, the router will use `filter` mode by default.
62+
63+
#### JWT Scope Requirements
64+
65+
When using the `@requiresScopes` directive, the router expects the user's granted scopes to be present in the JWT payload. The scopes should be in an array of strings or a string (scopes separated by space), within a claim named `scope`.
66+
67+
Here is an example of a JWT payload with the correct format:
68+
69+
```json
70+
{
71+
"sub": "user-123",
72+
"scope": [
73+
"read:products",
74+
"write:reviews"
75+
],
76+
"iat": 1516239022
77+
}
78+
```

lib/query-planner/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hive-router-query-planner"
3-
version = "2.0.2"
3+
version = "2.1.0"
44
edition = "2021"
55
description = "GraphQL query planner for Federation specification"
66
license = "MIT"

lib/router-config/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6666
### Fixed
6767

6868
- *(hive-router)* fix docker image issues ([#394](https://github.com/graphql-hive/router/pull/394))
69+
## 0.0.12 (2025-11-21)
70+
71+
### Features
72+
73+
#### Breaking
74+
75+
Removed `pool_idle_timeout_seconds` from `traffic_shaping`, instead use `pool_idle_timeout` with duration format.
76+
77+
```diff
78+
traffic_shaping:
79+
- pool_idle_timeout_seconds: 30
80+
+ pool_idle_timeout: 30s
81+
```
82+
83+
##540 by @ardatan
84+
6985
## 0.0.11 (2025-11-04)
7086

7187
### Fixes

0 commit comments

Comments
 (0)