apollo-compiler@1.0.0-beta.4
·
281 commits
to main
since this release
1.0.0-beta.4 - 2023-10-16
Features
-
JSON Serialisable compiler diagnostics - lrlna and goto-bus-stop, pull/698:
This change brings back JSON error format for diagnostics introduced by goto-bus-stop in pull/668 for compiler@0.11.3. As a result, diagnostics' line/column numbers are now also accessible as part of the public API.let json = expect_test::expect![[r#" { "message": "an executable document must not contain an object type definition", "locations": [ { "line": 2, "column": 1 } ] }"#]]; let diagnostics = executable.validate(&schema).unwrap_err(); diagnostics.iter().for_each(|diag| { assert_eq!( diag.get_line_column(), Some(GraphQLLocation { line: 2, column: 1 }) ); json.assert_eq(&serde_json::to_string_pretty(&diag.to_json()).unwrap()); });
Fixes
- Don’t emit a validation error for relying on argument default - SimonSapin, pull/700
A field argument or directive argument was incorrectly considered required as soon as it had a non-null type, even if it had a default value.