Skip to content

feat(meta-schema): expose i18n and realtime metadata in _meta query#1300

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

feat(meta-schema): expose i18n and realtime metadata in _meta query#1300
pyramation merged 2 commits into
mainfrom
feat/meta-schema-i18n-realtime

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Extends the _meta schema plugin to expose i18n and realtime metadata on MetaTable, continuing the pattern from storage/search (#1298) and enums (#1299).

i18n — tables tagged with @i18n <translation_table> now expose:

i18n {
  translationTable    # "post_translations"
  translatableFields { name type }  # [{name: "title", type: "text"}, ...]
}

Detection: reads codec.extensions.tags.i18n, then intersects the base table's text/citext columns with the translation table's attributes to produce the translatableFields list.

Realtime — tables tagged with @realtime now expose:

realtime {
  subscriptionFieldName  # "onPostChanged"
}

Detection: checks codec.extensions.tags.realtime, derives the subscription field name via on${tableType}Changed.

Both return null for tables without the respective tag. Adds buildI18nMeta() and buildRealtimeMeta() in storage-search-meta-builders.ts, new GraphQL types (MetaI18n, MetaI18nField, MetaRealtime), 6 unit tests, and updated introspection/schema snapshots.

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

- Add I18nMeta/I18nFieldMeta/RealtimeMeta TypeScript interfaces
- Add buildI18nMeta() detecting @i18n smart tag and translatable fields
- Add buildRealtimeMeta() detecting @realtime smart tag
- Add MetaI18n, MetaI18nField, MetaRealtime GraphQL types to MetaTable
- Add 6 unit tests covering i18n and realtime detection
- Update META_QUERY_CONTRACT and REQUIRED_META_QUERY_PATHS
- Update introspection and schema snapshots
@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 fe78d71 into main Jun 15, 2026
36 checks passed
@pyramation pyramation deleted the feat/meta-schema-i18n-realtime branch June 15, 2026 05:20
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