Skip to content

Commit

Permalink
fix: remove erronous error code from reports
Browse files Browse the repository at this point in the history
  • Loading branch information
obmarg committed Nov 13, 2024
1 parent 97ecb36 commit 7127e70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion cynic-parser/src/errors/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ impl Error {
let (message, label, note) = self.components();

let mut builder = ariadne::Report::build(ReportKind::Error, (), 0)
.with_code(3)
.with_message(message)
.with_label(label)
.with_config(Config::default().with_color(false));
Expand Down
4 changes: 2 additions & 2 deletions cynic-parser/tests/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn test_report() {
.to_report(document);

insta::assert_display_snapshot!(report, @r###"
[03] Error: unexpected closing brace ('}')
Error: unexpected closing brace ('}')
╭─[<unknown>:1:1]
1 │ type Blah {}
Expand All @@ -29,7 +29,7 @@ fn test_invalid_directive_location() {
.to_report(document);

insta::assert_display_snapshot!(report, @r###"
[03] Error: unknown directive location: BLAH. expected one of QUERY, MUTATION, SUBSCRIPTION, FIELD, FRAGMENT_DEFINITION, FRAGMENT_SPREAD, INLINE_FRAGMENT, SCHEMA, SCALAR, OBJECT, FIELD_DEFINITION, ARGUMENT_DEFINITION, INTERFACE, UNION, ENUM, ENUM_VALUE, INPUT_OBJECT, INPUT_FIELD_DEFINITION, VARIABLE_DEFINITION
Error: unknown directive location: BLAH. expected one of QUERY, MUTATION, SUBSCRIPTION, FIELD, FRAGMENT_DEFINITION, FRAGMENT_SPREAD, INLINE_FRAGMENT, SCHEMA, SCALAR, OBJECT, FIELD_DEFINITION, ARGUMENT_DEFINITION, INTERFACE, UNION, ENUM, ENUM_VALUE, INPUT_OBJECT, INPUT_FIELD_DEFINITION, VARIABLE_DEFINITION
╭─[<unknown>:1:1]
1 │ directive @Blah on BLAH
Expand Down

0 comments on commit 7127e70

Please sign in to comment.