From 526e794370ac9a0c34dd75bfdb342c4177c7f09e Mon Sep 17 00:00:00 2001 From: shrugs Date: Wed, 15 Apr 2026 10:49:47 -0500 Subject: [PATCH] fix: minor fixes from copilot after big pr --- apps/ensapi/src/lib/resolution/forward-resolution.ts | 10 ++++++++++ apps/ensapi/src/omnigraph-api/builder.ts | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/ensapi/src/lib/resolution/forward-resolution.ts b/apps/ensapi/src/lib/resolution/forward-resolution.ts index b8b86db74..2a14b6a6d 100644 --- a/apps/ensapi/src/lib/resolution/forward-resolution.ts +++ b/apps/ensapi/src/lib/resolution/forward-resolution.ts @@ -5,6 +5,7 @@ import { replaceBigInts } from "@ponder/utils"; import { type AccountId, asInterpretedName, + ENS_ROOT_NAME, type InterpretedName, isNormalizedName, type Node, @@ -148,6 +149,15 @@ async function _resolveForward( throw new Error(`'${name}' must be normalized to be resolvable.`); } + // TODO: technically we could support resolving records for the root node, but because there + // are so many edge cases, this is something we should explicitly declare support for + // after we have test cases + if (name === ENS_ROOT_NAME) { + throw new Error( + `Resolving records for the ENS Root Node ('') is not currently supported.`, + ); + } + const node: Node = namehashInterpretedName(name); span.setAttribute("node", node); diff --git a/apps/ensapi/src/omnigraph-api/builder.ts b/apps/ensapi/src/omnigraph-api/builder.ts index 9eebd9b44..eafbae869 100644 --- a/apps/ensapi/src/omnigraph-api/builder.ts +++ b/apps/ensapi/src/omnigraph-api/builder.ts @@ -5,7 +5,6 @@ import RelayPlugin from "@pothos/plugin-relay"; import TracingPlugin, { isRootField } from "@pothos/plugin-tracing"; import { AttributeNames, createOpenTelemetryWrapper } from "@pothos/tracing-opentelemetry"; import type { - Address, ChainId, CoinType, DomainId, @@ -59,7 +58,7 @@ const createSpan = createOpenTelemetryWrapper(tracer, { export type BuilderScalars = { ID: { Input: string; Output: string }; BigInt: { Input: bigint; Output: bigint }; - Address: { Input: Address; Output: NormalizedAddress }; + Address: { Input: NormalizedAddress; Output: NormalizedAddress }; Hex: { Input: Hex; Output: Hex }; ChainId: { Input: ChainId; Output: ChainId }; CoinType: { Input: CoinType; Output: CoinType };