Documentation
¶
Index ¶
- Variables
- func Main() int
- func MakeParser(opts ...kong.Option) (*kong.Kong, error)
- type CLI
- type Context
- type EmitQueryCmd
- type FilteringOptions
- type GenerateSDLCmd
- type GraphFilteringOptions
- type IncludeDirectivesOption
- type InputOptions
- type IntrospectionCmd
- type JsonCmd
- type LsCmd
- type LsDirectivesCmd
- type LsFieldsCmd
- type LsTypesCmd
- type MergeCmd
- type OutputOptions
- type SpecVersionOptions
- type VersionCmd
- type VizCmd
Constants ¶
This section is empty.
Variables ¶
View Source
var Groups = []kong.Group{
{
Key: "filtering",
Title: "Filtering options",
},
{
Key: "output",
Title: "Output formatting options",
},
}
Functions ¶
Types ¶
type CLI ¶
type CLI struct { Ls LsCmd `cmd:"" aliases:"list" help:"List types, fields, or directives in a GraphQL SDL document."` Json JsonCmd `cmd:"" help:"Return a JSON representation of a GraphQL SDL document."` Introspection IntrospectionCmd `cmd:"" help:"Interact with a GraphQL introspection endpoint over HTTP."` Viz VizCmd `cmd:"" help:"Visualize a GraphQL schema using GraphViz."` Merge MergeCmd `cmd:"" help:"Merge multiple GraphQL SDL documents into a single one."` VersionFlag versionFlag `hidden:"" help:"Print version and exit."` Version VersionCmd `cmd:"" help:"Print the version of gquil and exit."` }
type EmitQueryCmd ¶
type EmitQueryCmd struct { Json bool `name:"json" help:"Emit the query as JSON, suitable for passing to curl or similar."` SpecVersionOptions }
func (*EmitQueryCmd) Run ¶
func (c *EmitQueryCmd) Run(ctx Context) error
type FilteringOptions ¶
type FilteringOptions struct {
IncludeBuiltins bool `name:"include-builtins" group:"filtering" help:"Include built-in types and directives in output (omitted by default)."`
}
type GenerateSDLCmd ¶
type GenerateSDLCmd struct { Endpoint string `arg:"" help:"The GraphQL introspection endpoint URL to fetch from."` Headers []string `` /* 259-byte string literal not displayed */ Trace bool `name:"trace" help:"Dump the introspection HTTP request and response to stderr for debugging."` OutputOptions SpecVersionOptions FilteringOptions }
func (*GenerateSDLCmd) Help ¶
func (c *GenerateSDLCmd) Help() string
func (*GenerateSDLCmd) Run ¶
func (c *GenerateSDLCmd) Run(ctx Context) error
type GraphFilteringOptions ¶
type IncludeDirectivesOption ¶
type IncludeDirectivesOption struct {
IncludeDirectives bool `` /* 127-byte string literal not displayed */
}
type InputOptions ¶
type InputOptions struct { // TODO: stdin support SchemaFiles []string `arg:"" name:"schemas" help:"Path to the GraphQL SDL schema file(s) to read from."` }
type IntrospectionCmd ¶
type IntrospectionCmd struct { GenerateSDL GenerateSDLCmd `cmd:"" help:"Generate GraphQL SDL from a GraphQL introspection endpoint over HTTP(S)."` Query EmitQueryCmd `cmd:"" help:"Emit the GraphQL query used for introspection."` }
type JsonCmd ¶
type JsonCmd struct { InputOptions FilteringOptions GraphFilteringOptions }
type LsCmd ¶
type LsCmd struct { Types LsTypesCmd `cmd:"" help:"List types in the given schema(s)."` Fields LsFieldsCmd `cmd:"" help:"List fields in the given schema(s)."` Directives LsDirectivesCmd `cmd:"" help:"List directive definitions in the given schema(s)."` }
type LsDirectivesCmd ¶
type LsDirectivesCmd struct { InputOptions FilteringOptions OutputOptions }
func (LsDirectivesCmd) Help ¶ added in v0.2.0
func (c LsDirectivesCmd) Help() string
func (LsDirectivesCmd) Run ¶
func (c LsDirectivesCmd) Run(ctx Context) error
type LsFieldsCmd ¶
type LsFieldsCmd struct { InputOptions OnType string `name:"on-type" group:"filtering" help:"Only include fields which appear on the specified type."` OfType string `` /* 200-byte string literal not displayed */ ReturningType string `` /* 266-byte string literal not displayed */ Named string `` /* 141-byte string literal not displayed */ IncludeArgs bool `name:"include-args" group:"output" help:"Include argument definitions in human-readable output. Has no effect with --json."` IncludeDirectivesOption OutputOptions FilteringOptions GraphFilteringOptions }
func (LsFieldsCmd) Help ¶ added in v0.2.0
func (c LsFieldsCmd) Help() string
func (LsFieldsCmd) Run ¶
func (c LsFieldsCmd) Run(ctx Context) error
type LsTypesCmd ¶
type LsTypesCmd struct { InputOptions Kind ast.DefinitionKind `` /* 126-byte string literal not displayed */ MemberOf string `name:"member-of" group:"filtering" help:"Only list types which are members of the given union."` Implements string `name:"implements" group:"filtering" help:"Only list types which implement the given interface."` IncludeDirectivesOption FilteringOptions OutputOptions GraphFilteringOptions }
func (LsTypesCmd) Help ¶ added in v0.2.0
func (c LsTypesCmd) Help() string
func (LsTypesCmd) Run ¶
func (c LsTypesCmd) Run(ctx Context) error
type MergeCmd ¶
type MergeCmd struct { InputOptions FilteringOptions }
type OutputOptions ¶
type OutputOptions struct {
Json bool `name:"json" group:"output" help:"Output results as JSON."`
}
type SpecVersionOptions ¶
type SpecVersionOptions struct {
SpecVersion string `` /* 369-byte string literal not displayed */
}
type VersionCmd ¶ added in v0.1.7
type VersionCmd struct { }
func (VersionCmd) Run ¶ added in v0.1.7
func (c VersionCmd) Run(ctx Context) error
type VizCmd ¶
type VizCmd struct { InputOptions FilteringOptions GraphFilteringOptions InterfacesAsUnions bool `name:"interfaces-as-unions" help:"Treat interfaces as unions rather than objects for the purposes of graph construction."` }
Click to show internal directories.
Click to hide internal directories.