Skip to content

Batch domain lookup by name for migration eligibility #2059

@shrugs

Description

@shrugs

depends on materialization of names

Context

The apps/manager migration flow (PR ensdomains/apps-monorepo#593) needs to check, for hundreds of V1 names at once, "which of these names already have a V2 registration?" so it can exclude already-migrated names from the upgrade list.

Today (apps/manager/src/features/migration/service/getRegisteredV2Names.ts) this is done against the toy indexer in chunks of 1000:

query Domains($where: DomainFilter!) {
  domains(where: { name_in: $names }) { name }
}

The Omnigraph top-level domains(where: DomainsWhereInput!) only accepts a single partial-name string — it's a search/autocomplete shape, not a batch-lookup shape. There's no name_in: [InterpretedName!] filter, and domain(by: { name }) is single-shot.

Why this matters

The migration flow loads ~all of a user's V1 names (often hundreds) and must filter out those already on V2 before showing the selection UI. Without batch lookup, the client has to fan out N parallel domain(by: { name }) requests, which is wasteful and rate-limit-prone.

Related

  • ensdomains/apps-monorepo#593 (consumer)
  • apps/manager/src/features/migration/service/getRegisteredV2Names.ts (current legacy-subgraph implementation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions