diff --git a/apollo-federation/src/sources/connect/url_template.rs b/apollo-federation/src/sources/connect/url_template.rs index 666c8f8460..6529fd8ed6 100644 --- a/apollo-federation/src/sources/connect/url_template.rs +++ b/apollo-federation/src/sources/connect/url_template.rs @@ -376,7 +376,7 @@ impl FromStr for VariableType { .find(|var_type| var_type.as_str() == input) .ok_or_else(|| { format!( - "Variable type must be one of {}, got {input}", + "Variable type must be one of {}, got `{input}`", Self::iter().map(|var_type| var_type.as_str()).join(", ") ) }) @@ -514,7 +514,7 @@ mod test_parse { let err = URLTemplate::from_str("/something/{$blah.stuff}/more").unwrap_err(); assert_eq!( err.message, - "Variable type must be one of $args, $this, $config, got $blah" + "Variable type must be one of $args, $this, $config, got `$blah`" ); assert_eq!(err.location, Some(12..17)); } diff --git a/apollo-federation/src/sources/connect/validation/snapshots/validation_tests@invalid-path-parameter.graphql.snap b/apollo-federation/src/sources/connect/validation/snapshots/validation_tests@invalid-path-parameter.graphql.snap index a30a1f8578..0955d167c0 100644 --- a/apollo-federation/src/sources/connect/validation/snapshots/validation_tests@invalid-path-parameter.graphql.snap +++ b/apollo-federation/src/sources/connect/validation/snapshots/validation_tests@invalid-path-parameter.graphql.snap @@ -6,7 +6,7 @@ input_file: apollo-federation/src/sources/connect/validation/test_data/invalid-p [ Message { code: InvalidUrl, - message: "`GET` in `@connect(http:)` on `Query.resources` must be a valid URL template. Variable type must be one of $args, $this, $config, got $blah", + message: "`GET` in `@connect(http:)` on `Query.resources` must be a valid URL template. Variable type must be one of $args, $this, $config, got `$blah`", locations: [ 12:23..12:28, ],