mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
update help for metadata export command (#661)
This commit is contained in:
parent
fbd220621d
commit
de2ceea132
@ -6,6 +6,12 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const longHelpMetadataExportCmd = `Export Hasura metadata and save it in migrations/metadata.yaml file.
|
||||
The output is a yaml file which captures all the metadata required
|
||||
by GraphQL Engine. This includes info about tables that are tracked,
|
||||
permission rules, relationships and event triggers that are defined
|
||||
on those tables.`
|
||||
|
||||
func newMetadataExportCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
v := viper.New()
|
||||
opts := &metadataExportOptions{
|
||||
@ -16,7 +22,7 @@ func newMetadataExportCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
metadataExportCmd := &cobra.Command{
|
||||
Use: "export",
|
||||
Short: "Export Hasura GraphQL Engine metadata from the database",
|
||||
Example: ` # Export metadata and save it in metadata.yaml file:
|
||||
Example: ` # Export metadata and save it in migrations/metadata.yaml file:
|
||||
hasura metadata export`,
|
||||
SilenceUsage: true,
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
@ -26,6 +32,7 @@ func newMetadataExportCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return opts.run()
|
||||
},
|
||||
Long: longHelpMetadataExportCmd,
|
||||
}
|
||||
|
||||
f := metadataExportCmd.Flags()
|
||||
|
Loading…
Reference in New Issue
Block a user