-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dual-query-planner): fixed the remaining of coercion mismatches between Rust QP and JS QP #6090
Conversation
- updated vec_matches_as_set to use it.
…S QP - updated the coercion check to recurse into List and Object values. - loosened Object value check to be a inclusion check, instead of empty check
@duckki, please consider creating a changeset entry in |
CI performance tests
|
fn test_query_variable_decl_list_value_coercion_empty_case() { | ||
// Note: Rust QP expands empty list default values by filling in its default items. | ||
let op_x = r#"query($qv1: [Int!]! = []) { x(arg1: $qv1) }"#; | ||
let op_y = r#"query($qv1: [Int!]! = [1, 42]) { x(arg1: $qv1) }"#; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems strange? these are not equivalent queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y
is expected to have additional items over x
by filling in the (assumed-to-be) default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about that. The default value is declared to be []
in one and [1, 42]
in the other. This isn't a list that would pull in default values--it's a declaration of a default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For objects, default property values come from the input object definition, but that doesn't exist for lists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are right. We don't have to loosen lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this all looks right to me 🥳
Summary:
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.