Skip to content

Commit f172be5

Browse files
authored
Fix operation_name not being set in juniper_hyper (#1169, #1187)
1 parent dadd318 commit f172be5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

juniper_actix/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ All user visible changes to `juniper_actix` crate will be documented in this fil
1414
- Switched to 0.16 version of [`juniper` crate].
1515
- Switched to 0.4 version of [`juniper_graphql_ws` crate].
1616

17+
### Fixed
18+
19+
- `operationName` not being set. ([#1187], [#1169])
20+
1721
[#1034]: /../../pull/1034
22+
[#1169]: /../../issues/1169
23+
[#1187]: /../../pull/1187
1824

1925

2026

juniper_hyper/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ where
212212
S: ScalarValue,
213213
{
214214
let mut query = None;
215-
let operation_name = None;
215+
let mut operation_name = None;
216216
let mut variables = None;
217217
for (key, value) in form_urlencoded::parse(input.as_bytes()).into_owned() {
218218
match key.as_ref() {
@@ -226,6 +226,7 @@ where
226226
if operation_name.is_some() {
227227
return Err(invalid_err("operationName"));
228228
}
229+
operation_name = Some(value)
229230
}
230231
"variables" => {
231232
if variables.is_some() {

0 commit comments

Comments
 (0)