forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: completion spec for tailcall.run
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
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,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; |