Skip to content

Commit 8839d34

Browse files
Matthew Saundersfacebook-github-bot
authored andcommitted
Update broken url in error message
Summary: This diff updates the reference url in the error message for the `InvalidConnectionKeyArgPostfix` error. Also fix some linter errors that were picked up by CI 😅 ## More Details When trying to add a new relay connection, I got an error message in the command line with a url pointing to the relay docs. Specifically, a url to `https:// relay.dev/docs/en/pagination-container#connection`. {F1980415414} That url leads to a page that no longer exists... {F1980415420} I checked the [history of this page in the wayback machine](https://web.archive.org/web/20210228095734/https://relay.dev/docs/en/pagination-container#connection). In their records, the page used to show this... {F1980415369} I think based off of this, the best page to replace the url with is [`https://relay.dev/docs/tutorial/connections-pagination/`](https://relay.dev/docs/tutorial/connections-pagination/). Update the reference url in the error message for the InvalidConnectionKeyArgPostfix error. Reviewed By: lynnshaoyu Differential Revision: D78642574 fbshipit-source-id: eea893744c679fec73a0cea3d7c186a21883d0f6
1 parent c6316e5 commit 8839d34

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/crates/graphql-ir/src/errors.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ pub enum ValidationMessage {
354354
},
355355

356356
#[error(
357-
"Expected the {key_arg_name} argument to @{connection_directive_name} to be of form '<SomeName>_{postfix}', got '{key_arg_value}'. For a detailed explanation, check out https://relay.dev/docs/en/pagination-container#connection"
357+
"Expected the {key_arg_name} argument to @{connection_directive_name} to be of form '<SomeName>_{postfix}', got '{key_arg_value}'. For a detailed explanation, check out https://relay.dev/docs/tutorial/connections-pagination/"
358358
)]
359359
InvalidConnectionKeyArgPostfix {
360360
connection_directive_name: DirectiveName,
@@ -465,7 +465,7 @@ pub enum ValidationMessage {
465465

466466
#[error("The field `{parent_name}.{field_name}` is deprecated.{}",
467467
match deprecation_reason {
468-
Some(reason) => format!(" Deprecation reason: \"{}\"", reason),
468+
Some(reason) => format!(" Deprecation reason: \"{reason}\""),
469469
None => "".to_string()
470470
}
471471
)]
@@ -477,7 +477,7 @@ pub enum ValidationMessage {
477477

478478
#[error("The argument `{argument_name}` of the field `{parent_name}.{field_name}` is deprecated.{}",
479479
match deprecation_reason {
480-
Some(reason) => format!(" Deprecation reason: \"{}\"", reason),
480+
Some(reason) => format!(" Deprecation reason: \"{reason}\""),
481481
None => "".to_string()
482482
})]
483483
DeprecatedFieldArgument {
@@ -489,7 +489,7 @@ pub enum ValidationMessage {
489489

490490
#[error("The argument `{argument_name}` of the directive `@{directive_name}` is deprecated.{}",
491491
match deprecation_reason {
492-
Some(reason) => format!(" Deprecation reason: \"{}\"", reason),
492+
Some(reason) => format!(" Deprecation reason: \"{reason}\""),
493493
None => "".to_string()
494494
})]
495495
DeprecatedDirectiveArgument {
@@ -640,7 +640,7 @@ impl WithDiagnosticData for ValidationMessageWithData {
640640
.map(|suggestion| into_box(*suggestion))
641641
.collect::<_>(),
642642
ValidationMessageWithData::ExpectedSelectionsOnObjectField { field_name, .. } => {
643-
vec![Box::new(format!("{} {{ }}", field_name))]
643+
vec![Box::new(format!("{field_name} {{ }}"))]
644644
}
645645
ValidationMessageWithData::DeprecatedDangerouslyUnaliasedDirective => {
646646
vec![Box::new("@alias".to_string())]

compiler/crates/relay-transforms/tests/validate_connections/fixtures/connection-invalid-key-name.invalid.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ query NodeQuery($id: ID!) {
1515
}
1616
}
1717
==================================== ERROR ====================================
18-
✖︎ Expected the key argument to @connection to be of form '<SomeName>__comments', got 'invalid'. For a detailed explanation, check out https://relay.dev/docs/en/pagination-container#connection
18+
✖︎ Expected the key argument to @connection to be of form '<SomeName>__comments', got 'invalid'. For a detailed explanation, check out https://relay.dev/docs/tutorial/connections-pagination/
1919

2020
connection-invalid-key-name.invalid.graphql:6:44
2121
5 │ ... on Story {

0 commit comments

Comments
 (0)