cli/commands/internal/graphql/
mod.rs1pub mod inspect;
2pub mod list;
3pub mod run;
4
5#[derive(Debug, clap::Args)]
6pub struct Graphql {
7 #[command(subcommand)]
8 pub command: GraphqlCommand,
9}
10
11#[derive(Debug, clap::Subcommand)]
12pub enum GraphqlCommand {
13 List(list::List),
15 Inspect(inspect::Inspect),
17 Run(run::Run),
19}
20
21impl Graphql {
22 pub fn run(self) -> anyhow::Result<()> {
23 match self.command {
24 GraphqlCommand::List(v) => v.run(),
25 GraphqlCommand::Inspect(v) => v.run(),
26 GraphqlCommand::Run(v) => v.run(),
27 }
28 }
29}