Skip to content

Commit

Permalink
fix(query-engine): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno committed Nov 27, 2024
1 parent 3a4cdab commit 5951ba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ mod default_value {
name
}
}"#),
@r###"{"data":{"createOneUser":{"name":"Spiderman"}}}"###
@r###"{"data":{"createOneUser":{"name":"Peter Parker"}}}"###
);

insta::assert_snapshot!(
Expand All @@ -200,7 +200,7 @@ mod default_value {
name
}
}"#),
@r###"{"data":{"createOneUser":{"name":"Superman"}}}"###
@r###"{"data":{"createOneUser":{"name":"Clark Kent"}}}"###
);

insta::assert_snapshot!(
Expand All @@ -210,7 +210,7 @@ mod default_value {
age
}
}"#),
@r###"{"data":{"findUniqueUser":{"name":"Superman","age":32}}}"###
@r###"{"data":{"findUniqueUser":{"name":"Clark Kent","age":32}}}"###
);

insta::assert_snapshot!(
Expand All @@ -225,7 +225,7 @@ mod default_value {
age
}
}"#),
@r###"{"data":{"findManyUser":[{"name":"Spiderman","age":21},{"name":"Superman","age":32}]}}"###
@r###"{"data":{"findManyUser":[{"name":"Peter Parker","age":21},{"name":"Clark Kent","age":32}]}}"###
);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion query-engine/core/src/query_document/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ impl QueryDocumentParser {
};

match typ {
EnumType::Database(db) => match db.value_for(raw.as_str()) {
EnumType::Database(db) => match db.map_input_value(&raw) {
Some(value) => Ok(ParsedInputValue::Single(value)),
None => err(&db.identifier().name()),
},
Expand Down

0 comments on commit 5951ba0

Please sign in to comment.