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
This commit adds the following errors:
* error when a non-federated graph is about to be overwritten by a subgraph
* error when running subgraph check on a federated graph
* error for attempts to introspect a subgraph on graphs which don't support _service
Co-authored-by: Irina Shestak <[email protected]>
Copy file name to clipboardexpand all lines: src/error/metadata/suggestion.rs
+4-2
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ pub enum Suggestion {
30
30
ProperKey,
31
31
NewUserNoProfiles,
32
32
CheckServerConnection,
33
+
ConvertGraphToSubgraph,
33
34
}
34
35
35
36
implDisplayforSuggestion{
@@ -66,7 +67,7 @@ impl Display for Suggestion {
66
67
format!("Try resolving the composition errors in your subgraph(s), and publish them with the {} command.",Yellow.normal().paint("`rover subgraph publish`"))
67
68
}
68
69
Suggestion::UseFederatedGraph => {
69
-
"Try running the command on a valid federated graph.".to_string()
70
+
"Try running the command on a valid federated graph or use the appropriate `rover graph` command instead of `rover subgraph`.".to_string()
70
71
}
71
72
Suggestion::CheckGraphNameAndAuth => {
72
73
"Make sure your graph name is typed correctly, and that your API key is valid. (Are you using the right profile?)".to_string()
@@ -124,7 +125,8 @@ impl Display for Suggestion {
124
125
)
125
126
}
126
127
Suggestion::Adhoc(msg) => msg.to_string(),
127
-
Suggestion::CheckServerConnection => "Make sure the endpoint accepting connections is spelled correctly".to_string()
128
+
Suggestion::CheckServerConnection => "Make sure the endpoint accepting connections is spelled correctly".to_string(),
129
+
Suggestion::ConvertGraphToSubgraph => "If you are sure you want to convert a non-federated graph to a subgraph, you can re-run the same command with a `--convert` flag.".to_string(),
0 commit comments