MCPcopy
hub / github.com/hasura/graphql-engine / Execute

Method Execute

cli/commands/init.go:404–424  ·  view source on GitHub ↗
(ctx fsm.EventContext)

Source from the content-addressed store, hash-verified

402type exportingMetadataAction struct{}
403
404func (a *exportingMetadataAction) Execute(ctx fsm.EventContext) eventType {
405 context := ctx.(*initCtx)
406 opts := MetadataExportOptions{
407 EC: context.ec,
408 }
409 context.logger.Debug(exportingMetadata)
410 if err := context.ec.Validate(); err != nil {
411 context.err = err
412 return exportMetadataFailed
413 }
414 // Note: Here ec won't use the values from `--endpoint` and `--admin-secret` or `--access-key` flags
415 context.ec.Spin("Exporting metadata...")
416 if err := opts.Run(); err != nil {
417 opts.EC.Spinner.Stop()
418 context.err = err
419 return exportMetadataFailed
420 }
421 opts.EC.Spinner.Stop()
422 opts.EC.Logger.Info("Metadata exported")
423 return createMigration
424}
425
426type failedExportingMetadataAction struct{}
427

Callers

nothing calls this directly

Calls 3

RunMethod · 0.95
SpinMethod · 0.80
ValidateMethod · 0.45

Tested by

no test coverage detected