-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor the rest of rover-client (#675)
- Loading branch information
1 parent
48cda70
commit 9c9e487
Showing
50 changed files
with
598 additions
and
384 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
crates/rover-client/src/operations/config/is_federated.graphql
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
crates/rover-client/src/operations/config/is_federated/is_federated_query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query IsFederatedGraph($graph_id: ID!, $variant: String!) { | ||
service(id: $graphId) { | ||
implementingServices(graphVariant: $variant) { | ||
__typename | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
crates/rover-client/src/operations/config/is_federated/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod runner; | ||
mod types; | ||
|
||
pub(crate) use runner::run; | ||
pub(crate) use types::IsFederatedInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
crates/rover-client/src/operations/config/is_federated/types.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::operations::config::is_federated::runner::is_federated_graph; | ||
use crate::shared::GraphRef; | ||
|
||
type QueryVariables = is_federated_graph::Variables; | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct IsFederatedInput { | ||
pub graph_ref: GraphRef, | ||
} | ||
|
||
impl From<IsFederatedInput> for QueryVariables { | ||
fn from(input: IsFederatedInput) -> Self { | ||
Self { | ||
graph_id: input.graph_ref.name, | ||
variant: input.graph_ref.variant, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
crates/rover-client/src/operations/graph/fetch/fetch_query.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
query GraphFetchQuery($graph_id: ID!, $variant: String) { | ||
frontendUrlRoot, | ||
service(id: $graph_id) { | ||
schema(tag: $variant) { | ||
document | ||
} | ||
variants { | ||
name | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod runner; | ||
mod types; | ||
|
||
pub use runner::run; | ||
pub use types::GraphFetchInput; |
Oops, something went wrong.