update help for metadata export command (#661)

This commit is contained in:
Aravind 2018-10-08 12:54:43 +05:30 committed by Shahidh K Muhammed
parent fbd220621d
commit de2ceea132

View File

@ -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()