Skip to content

Commit

Permalink
feat: completion spec for tailcall.run (withfig#2427)
Browse files Browse the repository at this point in the history
  • Loading branch information
neo773 authored Aug 7, 2024
1 parent fd998a2 commit 089b155
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions src/tailcall.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const completionSpec: Fig.Spec = {
name: "tailcall",
description:
"TailCall CLI for managing and optimizing GraphQL configurations",
subcommands: [
{
name: "check",
description: "Validate a composition spec",
args: {
name: "FILE_PATHS",
template: "filepaths",
isVariadic: true,
},
options: [
{
name: "--n-plus-one-queries",
description: "Detect N+1 issues",
isPersistent: true,
},
{
name: "--schema",
description: "Display the schema of the composition spec",
isPersistent: true,
},
{
name: "--format",
description: "Change the format of the input file",
args: {
suggestions: ["gql", "graphql", "yml", "yaml", "json"],
},
},
],
},
{
name: "start",
description: "Launch the GraphQL Server for the specific configuration",
args: {
name: "PATHS",
template: ["filepaths", "folders"],
isVariadic: true,
},
},
{
name: "init",
description: "Bootstrap a new TailCall project",
args: {
name: "FILE_PATH",
template: "folders",
},
},
{
name: "gen",
description: "Generate GraphQL configurations from various sources",
args: {
name: "CONFIG_FILE",
template: "filepaths",
},
},
],
};

export default completionSpec;

0 comments on commit 089b155

Please sign in to comment.