hasura/graphql-engine · error
seed operations on database '%s' of kind '%s' is not support
Error message
seed operations on database '%s' of kind '%s' is not supported
What it means
Returned by `hasura seed create` when the metadata source's kind does not support seed operations. The CLI checks seed.IsSeedsSupported(ec.Source.Kind) before exporting/creating seeds; only certain source kinds (e.g. postgres) support seeds.
Source
Thrown at cli/commands/seed_create.go:80
if ec.Config.Version < cli.V3 {
return nil
}
err = databaseChooser(ec)
if err != nil {
return errors.E(op, err)
}
err = validateSourceInfo(ec)
if err != nil {
return errors.E(op, err)
}
// check if seed ops are supported for the database
if !seed.IsSeedsSupported(ec.Source.Kind) {
return errors.E(
op,
fmt.Errorf(
"seed operations on database '%s' of kind '%s' is not supported",
ec.Source.Name,
ec.Source.Kind,
),
)
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
op := genOpName(cmd, "RunE")
opts.SeedName = args[0]
opts.Source = ec.Source
opts.Driver = getSeedDriver(ec, ec.Config.Version)
err := opts.Run()
if err != nil {
return errors.E(op, err)View on GitHub (pinned to 724551b9ae)
Solutions
- Re-run targeting a postgres source, e.g. `hasura seed create --database-name <pg-source-name>` (or add --source on older CLIs)
- Add a postgres source to metadata (databases.yaml) if the project only has unsupported kinds
- If you must seed a non-pg database, apply data manually with that database's native tooling (sqlcmd, etc.)
Example fix
// before hasura seed create my_seed --database-name mssql-source // after hasura seed create my_seed --database-name postgres-source
Defensive patterns
Strategy: validation
Validate before calling
// before running seed create, check the source kind
import "github.com/hasura/graphql-engine/cli/mobile/plugins/hasura/internal/seed" // conceptual
func seedsSupported(kind hasura.SourceKind) bool {
switch kind {
case hasura.SourceKindPG, hasura.SourceKindCitus:
return true
}
return false
}
if !seedsSupported(source.Kind) {
log.Fatalf("source %s (%s) does not support seeds", source.Name, source.Kind)
} Type guard
func isSeedableSource(s *hasura.Source) bool {
return s != nil && (s.Kind == hasura.SourceKindPG || s.Kind == hasura.SourceKindCitus)
} Prevention
- Default the CLI's --database-name to a postgres source in project scripts
- Document supported source kinds for teams using MSSQL sources
When it happens
Trigger: Running `hasura seed create` against a metadata source whose kind is not supported (e.g. mssql, citus, or any non-postgres backend added in metadata databases.yaml), given IsSeedsSupported returns false for that kind.
Common situations: Projects with multiple sources where the default/selected source is MSSQL (common on Azure), or custom data-source plugins registered with an unsupported kind.
Related errors
- error while applying seeds for database '%s': %w
- exporting seed data: %w
- cannot find default editor from env: %w
- failed to create seed file: %w
- unsupported source kind, source name: %v kind: %v
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/5b6a36c3548a6634.
Report an issue: GitHub.