Skip to content

feat(meta-schema): expose enum metadata in _meta field-level introspection#1299

Merged
pyramation merged 2 commits into
mainfrom
feat/meta-schema-enums
Jun 15, 2026
Merged

feat(meta-schema): expose enum metadata in _meta field-level introspection#1299
pyramation merged 2 commits into
mainfrom
feat/meta-schema-enums

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Adds enumValues to MetaField so clients can discover PostgreSQL enum types and their allowed values per field — enabling auto-generated select/dropdown UIs in meta-forms without hardcoding enum knowledge.

_meta {
  tables {
    fields {
      name
      enumValues {   # null for non-enum fields
        name         # pg enum type name, e.g. "status_enum"
        values       # ["active", "inactive", "pending"]
      }
    }
  }
}

Detection logic in extractEnumMeta(codec):

  • Direct enum codecs (codec.values array present)
  • Domain-wrapped enums (codec.domainOfCodec → inner enum)
  • Array-of-enum (codec.arrayOfCodec → inner enum)

New types: EnumMeta (TS interface), MetaEnum (GraphQL object type).

Follows the same builder pattern established for storage/search in #1298.

Link to Devin session: https://app.devin.ai/sessions/c93bb5e1b114421196d8eb28435b0515
Requested by: @pyramation

…ction

Add enumValues field to MetaField that exposes PostgreSQL enum type name
and allowed values for fields with enum types. Supports direct enum codecs,
domain-wrapped enums, and array-of-enum detection.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@blacksmith-sh

This comment has been minimized.

@pyramation pyramation merged commit ab06916 into main Jun 15, 2026
36 checks passed
@pyramation pyramation deleted the feat/meta-schema-enums branch June 15, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant