Skip to content

Migrate beautifyInterpretedName consumers to Omnigraph beautified fields #2160

@shrugs

Description

@shrugs

Part of #1360.

Follow-up to the PR that adds the display-only beautified fields to the Omnigraph (CanonicalName.beautified: BeautifiedName! and Label.beautified: BeautifiedLabel!) and the beautifyInterpretedLabel helper to enssdk.

Now that the API beautifies server-side, consumers should query canonical { name { beautified } } and render that value directly instead of calling beautifyInterpretedName(...) client-side. interpreted is still queried wherever a value is used as a navigation target or lookup key (the beautified value MUST NOT be).

Do not land until:

  • 1.14.x is in production (so the example apps' live endpoint serves the new fields), and
  • v2-sepolia materializes canonical names (the example apps still read the deprecated Domain.name and have inline TODOs gated on this — see the // TODO: after upgrading v2-sepolia to have materialized canonical name markers).

Target form

# fragment / selection
canonical { name { interpreted beautified } }
  • Display: render domain.canonical.name.beautified (drop the beautifyInterpretedName(...) call).
  • Navigation target / lookup key: keep domain.canonical.name.interpreted.
  • Drop the now-unused beautifyInterpretedName import where no other usage remains.

Locations to migrate

Example apps (also resolve the legacy Domain.namecanonical TODOs)

  • examples/enssdk-example/src/index.ts — fragment + formatDomain (resolve the inline TODO; switch domain.namecanonical { name { interpreted beautified } }).
  • examples/enskit-react-example/src/DomainView.tsxDomainFragment, SubdomainLink, RenderDomain heading, and parent link (resolve the inline TODOs).
  • examples/enskit-react-example/src/AccountView.tsxAccountDomainsQuery edges + render (resolve the inline TODO).
  • examples/enskit-react-example/src/SearchView.tsxDomainsByNameQuery edges + render (resolve the inline TODO).

Docs walkthroughs (already on canonical.name.interpreted + client-side beautify; just swap to .beautified)

  • docs/ensnode.io/src/content/docs/docs/integrate/index.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enssdk/index.mdx
  • docs/ensnode.io/src/content/docs/docs/integrate/integration-options/enskit/index.mdx

Keep the docs walkthroughs in sync with the corresponding example apps.

Validation

  • Regenerate gql.tada types: pnpm generate
  • pnpm typecheck, pnpm lint, pnpm test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions