Skip to content

Commit

Permalink
Fix operation_name not being set in juniper_hyper (#1169, #1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron authored Sep 12, 2023
1 parent dadd318 commit f172be5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions juniper_actix/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ All user visible changes to `juniper_actix` crate will be documented in this fil
- Switched to 0.16 version of [`juniper` crate].
- Switched to 0.4 version of [`juniper_graphql_ws` crate].

### Fixed

- `operationName` not being set. ([#1187], [#1169])

[#1034]: /../../pull/1034
[#1169]: /../../issues/1169
[#1187]: /../../pull/1187



Expand Down
3 changes: 2 additions & 1 deletion juniper_hyper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ where
S: ScalarValue,
{
let mut query = None;
let operation_name = None;
let mut operation_name = None;
let mut variables = None;
for (key, value) in form_urlencoded::parse(input.as_bytes()).into_owned() {
match key.as_ref() {
Expand All @@ -226,6 +226,7 @@ where
if operation_name.is_some() {
return Err(invalid_err("operationName"));
}
operation_name = Some(value)
}
"variables" => {
if variables.is_some() {
Expand Down

0 comments on commit f172be5

Please sign in to comment.