You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having arguments of type List with non-nullable items, such as e.g. [String!],
the validation doesn't recognize a violation if I pass a list with null-values.
…sition (#746)
* chore(compiler): add regression test for #738
* chore(compiler): remove 2 suffix from method names
* fix(compiler): raise a diagnostic for null items in a non-nullable list
* clippy
* test nested list inside object
* fix(compiler): null type is never assignable to a non-null type and always assignable to a nullable type
* chore(compiler): add failing test for providing list to non-list type
* Use name from ExtendedType where possible
* fix(compiler): reject list values provided to non-list types
* port value tests from graphql-js
* only instantiate the test schema once
* Use #[track_caller]
Co-authored-by: Simon Sapin <[email protected]>
* Use `ExtendedType::is_input_type` instead of manual match
* Assert diagnostics output for the graphql-js value type tests
* remove excess whitespace from test schema and queries
Used the runtime `unindent` crate instead of compile-time `indoc` so it doesn't need to be repeated at every call site.
* Remove outdated comment
---------
Co-authored-by: Simon Sapin <[email protected]>
Description
When having arguments of type
List
with non-nullable items, such as e.g.[String!]
,the validation doesn't recognize a violation if I pass a list with null-values.
Steps to reproduce
Imagine having this schema:
and validating the following query:
Here a code sample.
Expected result
The validation should identify the violation and append it to the diagnostic list.
Actual result
The validation doesn't notice the violation, no such error in diagnostics. (also in version
0.11.3
)Environment
apollo-rs
crate: apollo-compilerThe text was updated successfully, but these errors were encountered: