enskit omnigraph: react bindings, id refactoring, schema improvements#1867
enskit omnigraph: react bindings, id refactoring, schema improvements#1867
Conversation
🦋 Changeset detectedLatest commit: 21670a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughConsolidates ID/CAIP helpers into Changes
Sequence Diagram(s)sequenceDiagram
participant Browser
participant App as React App
participant Provider as OmnigraphProvider
participant URQL as URQL Client
participant Cache as Graphcache Exchange
participant OmnigraphAPI as Omnigraph API
participant DB as Database
Browser->>App: navigate route (e.g. /domain/:name)
App->>Provider: render with EnsNodeClient
Provider->>URQL: memoize/create client(ensNodeUrl)
App->>URQL: useOmnigraphQuery(query, vars)
URQL->>Cache: resolve query (keys, connection resolvers)
alt cache miss
Cache->>OmnigraphAPI: POST /api/omnigraph (query + vars)
OmnigraphAPI->>DB: load data (by id or by.contract)
DB-->>OmnigraphAPI: return rows
OmnigraphAPI-->>Cache: return data
Cache-->>URQL: deliver result (cacheOutcome meta)
else cache hit
Cache-->>URQL: return cached result (cacheOutcome meta)
end
URQL-->>App: data | loading | error
App-->>Browser: render UI
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Continues the Omnigraph client work by splitting out an enssdk Omnigraph module (including a distributable schema artifact), adding a new enskit React-facing wrapper around Omnigraph using urql/graphcache, and introducing a Vite-based example app to demonstrate typed Omnigraph queries.
Changes:
- Add
enssdkOmnigraph schema/module structure, including generated SDL artifacts and an integration test harness. - Introduce new
enskitpackage providing React hooks/provider + urql client setup for Omnigraph. - Expand the monorepo workspace to include
examples/*and add anenskit-react-exampleVite app.
Reviewed changes
Copilot reviewed 32 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.integration.config.ts | Updates integration workspace project discovery and sets ENSNODE_URL env default. |
| pnpm-workspace.yaml | Adds examples/* to the pnpm workspace. |
| pnpm-lock.yaml | Adds/updates dependencies for new packages/example (urql/graphcache, vite, react-router, etc.). |
| packages/enssdk/vitest.integration.config.ts | Adds package-level integration test config for enssdk. |
| packages/enssdk/vitest.config.ts | Simplifies vitest config and excludes integration tests. |
| packages/enssdk/src/omnigraph/schema.ts | Adds runtime-built GraphQL schema from generated SDL. |
| packages/enssdk/src/omnigraph/module.ts | Moves Omnigraph query module implementation into a dedicated module file. |
| packages/enssdk/src/omnigraph/module.test.ts | Updates unit test import to new module location. |
| packages/enssdk/src/omnigraph/module.integration.test.ts | Adds integration test hitting a real ENSNode Omnigraph endpoint. |
| packages/enssdk/src/omnigraph/index.ts | Re-exports Omnigraph graphql helpers, module, and schema. |
| packages/enssdk/src/omnigraph/generated/schema.graphql | Updates generated schema nullability for relay edges/nodes. |
| packages/enssdk/src/omnigraph/generated/schema-sdl.ts | Adds generated SDL string for runtime schema construction. |
| packages/enssdk/src/omnigraph/generated/graphql-env.d.ts | Updates gql.tada environment types to match new nullability. |
| packages/enssdk/package.json | Exports and publishes schema.graphql alongside existing Omnigraph exports; adds @types/node devDep. |
| packages/enskit/vitest.integration.config.ts | Adds enskit integration test config (jsdom). |
| packages/enskit/vitest.config.ts | Adds enskit unit test config (jsdom) excluding integration tests. |
| packages/enskit/tsup.config.ts | Adds tsup build config for bundling enskit’s React Omnigraph entrypoint. |
| packages/enskit/tsconfig.json | Adds TypeScript config for enskit package build. |
| packages/enskit/src/react/omnigraph/provider.tsx | Adds React provider wiring an urql Client into context. |
| packages/enskit/src/react/omnigraph/index.ts | Public React Omnigraph entrypoint re-exporting gql.tada helpers + hooks/provider. |
| packages/enskit/src/react/omnigraph/hooks.ts | Adds useOmnigraphQuery hook wrapper over urql useQuery. |
| packages/enskit/src/react/omnigraph/client.ts | Adds urql Client factory using graphcache + schema introspection. |
| packages/enskit/package.json | Converts enskit into a publishable ESM package with exports, build, lint, and test scripts. |
| packages/enskit/biome.jsonc | Adds Biome config for enskit package. |
| examples/enskit-react-example/vite.config.ts | Adds Vite config for the new React example app. |
| examples/enskit-react-example/tsconfig.json | Adds TS config enabling gql.tada plugin against the Omnigraph schema file. |
| examples/enskit-react-example/src/vite-env.d.ts | Adds Vite client types reference. |
| examples/enskit-react-example/src/main.tsx | Adds example app bootstrap using OmnigraphProvider + routing. |
| examples/enskit-react-example/src/DomainView.tsx | Adds example view using typed gql.tada queries/fragments + useOmnigraphQuery. |
| examples/enskit-react-example/package.json | Adds example app package metadata and dependencies. |
| examples/enskit-react-example/index.html | Adds example app HTML entrypoint. |
| apps/ensapi/vitest.integration.config.ts | Removes integration globalSetup from ensapi’s integration config. |
| apps/ensapi/src/test/integration/omnigraph-api-client.ts | Makes ENSNODE_URL required (non-null asserted) for integration client URL. |
| apps/ensapi/src/test/integration/global-setup.ts | Removes integration health-check global setup implementation. |
| apps/ensapi/src/omnigraph-api/lib/write-graphql-schema.ts | Updates schema writer to emit both schema.graphql and schema-sdl.ts. |
| apps/ensapi/src/omnigraph-api/builder.ts | Sets global relay edge/node nullability defaults and options. |
| apps/ensapi/package.json | Removes test:integration script. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/enskit-react-example/src/DomainView.tsx`:
- Around line 43-47: The route param is being unsafely cast to the branded type
InterpretedName when calling useOmnigraphQuery; instead validate the value from
useParams() with a Zod schema before using it. Create or reuse a Zod schema for
ENS names (e.g., nameSchema) and call nameSchema.parse(name) (or safeParse and
handle errors) to produce a validated value, then pass that validated value into
the variables for DomainByNameQuery in the useOmnigraphQuery call; remove the
"as InterpretedName" assertion and ensure error handling or fallback behavior if
validation fails.
In `@packages/enskit/src/react/omnigraph/hooks.ts`:
- Around line 8-13: UseOmnigraphQueryArgs currently makes variables optional for
all documents; change its variables property to a conditional type like the
QueryOptions pattern so that when the document's Variables type has keys
variables is required and when it doesn't it's optional/undefined. Update the
type alias UseOmnigraphQueryArgs<Data, Variables extends AnyVariables =
AnyVariables> (and any related usages/casts that mask the mismatch) to follow
the V extends Record<string, unknown> ? keyof V extends never ? { variables?: V
} : { variables: V } : { variables?: undefined } pattern (or equivalent)
referencing the DocumentNode|TadaDocumentNode generic so required GraphQL
variables are enforced at compile time. Ensure any current casts around
UseOmnigraphQueryArgs are removed or adjusted to preserve the stricter typing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7420ab6d-8c49-49c3-9486-7289b580ec83
⛔ Files ignored due to path filters (4)
packages/enssdk/src/omnigraph/generated/graphql-env.d.tsis excluded by!**/generated/**packages/enssdk/src/omnigraph/generated/schema-sdl.tsis excluded by!**/generated/**packages/enssdk/src/omnigraph/generated/schema.graphqlis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (33)
apps/ensapi/package.jsonapps/ensapi/src/omnigraph-api/builder.tsapps/ensapi/src/omnigraph-api/lib/write-graphql-schema.tsapps/ensapi/src/test/integration/global-setup.tsapps/ensapi/src/test/integration/omnigraph-api-client.tsapps/ensapi/vitest.integration.config.tsexamples/enskit-react-example/index.htmlexamples/enskit-react-example/package.jsonexamples/enskit-react-example/src/DomainView.tsxexamples/enskit-react-example/src/main.tsxexamples/enskit-react-example/src/vite-env.d.tsexamples/enskit-react-example/tsconfig.jsonexamples/enskit-react-example/vite.config.tspackages/enskit/biome.jsoncpackages/enskit/package.jsonpackages/enskit/src/react/omnigraph/client.tspackages/enskit/src/react/omnigraph/hooks.tspackages/enskit/src/react/omnigraph/index.tspackages/enskit/src/react/omnigraph/provider.tsxpackages/enskit/tsconfig.jsonpackages/enskit/tsup.config.tspackages/enskit/vitest.config.tspackages/enskit/vitest.integration.config.tspackages/enssdk/package.jsonpackages/enssdk/src/omnigraph/index.tspackages/enssdk/src/omnigraph/module.integration.test.tspackages/enssdk/src/omnigraph/module.test.tspackages/enssdk/src/omnigraph/module.tspackages/enssdk/src/omnigraph/schema.tspackages/enssdk/vitest.config.tspackages/enssdk/vitest.integration.config.tspnpm-workspace.yamlvitest.integration.config.ts
💤 Files with no reviewable changes (3)
- apps/ensapi/package.json
- apps/ensapi/vitest.integration.config.ts
- apps/ensapi/src/test/integration/global-setup.ts
- generate minified introspection via @urql/introspection instead of raw SDL - replace runtime introspectionFromSchema + buildSchema with pre-computed introspection - add graphcache local resolvers for domain, account, registry, resolver - disable yoga's built-in CORS (handled by Hono middleware) - disable noUnusedFunctionParameters for graphcache resolver file Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…Id encoding as hex when should be string number
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 96 out of 101 changed files in this pull request and generated 11 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/enskit-react-example/src/main.tsx`:
- Around line 26-28: Replace the plain <a href="/domain/eth"> and <a
href="/registry"> anchors inside the <nav> with client-side Link components so
navigation stays in-app and preserves OmnigraphProvider/URQL state; import Link
from your router library (e.g., react-router-dom's Link) and use <Link
to="/domain/eth">Domains</Link> and <Link to="/registry">Registry Cache
Demo</Link> in place of the href anchors in the navigation.
In `@examples/enskit-react-example/src/RegistryView.tsx`:
- Line 86: In RegistryView (the JSX rendering the registry IDs), remove the
literal dollar sign and template delimiters and render the values as JSX
expressions instead of a template string; specifically replace the templated
markup around byIdResult.data?.registry?.id and byOwnerResult.data?.registry?.id
so the dollar sign is not output and the values are rendered via JSX expression
evaluation.
- Around line 25-28: The CacheStatus component currently treats cacheOutcome as
truthy/falsy causing "miss" and "partial" to be shown as a hit; update
CacheStatus to read result.operation.context.meta.cacheOutcome and explicitly
branch on its string values: if cacheOutcome === "hit" render a green "[hit]",
if cacheOutcome === "miss" render an orange/red "[miss]", if cacheOutcome ===
"partial" render a distinct color (e.g., orange) and label "[partial]", and
fallback to a neutral "[unknown]" for any other value.
In `@packages/enskit/src/react/omnigraph/client.ts`:
- Around line 21-25: The JSDoc block at the top of
packages/enskit/src/react/omnigraph/client.ts is incomplete and has a redundant
`@returns`; either finish the summary so it reads as a complete sentence and adds
meaningful detail, or remove the JSDoc block entirely (and drop the redundant
`@returns` line) so the function signature stands alone; locate the comment
immediately preceding the client function (the JSDoc starting "Many of our
resolvers allow for exact") and update it accordingly.
In `@packages/enssdk/src/lib/helpers.ts`:
- Around line 3-8: The JSDoc above uint256ToHex32 is incorrect (references
AssetId/CAIP-19); update the comment to accurately describe that uint256ToHex32
takes a bigint and returns a 32-byte (256-bit) hex string (using toHex with {
size: 32 }) — keep the signature and implementation (export const uint256ToHex32
= (num: bigint): Hex => toHex(num, { size: 32 })) unchanged and ensure the doc
mentions input type bigint and returned Hex format.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0bad450e-70df-4126-ab62-8e49f5c81d2d
⛔ Files ignored due to path filters (4)
packages/enssdk/src/omnigraph/generated/graphql-env.d.tsis excluded by!**/generated/**packages/enssdk/src/omnigraph/generated/introspection.tsis excluded by!**/generated/**packages/enssdk/src/omnigraph/generated/schema.graphqlis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (74)
.changeset/warm-ghosts-enjoy.mdapps/ensapi/package.jsonapps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.tsapps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database.tsapps/ensapi/src/omnigraph-api/lib/write-graphql-schema.tsapps/ensapi/src/omnigraph-api/schema/account-id.tsapps/ensapi/src/omnigraph-api/schema/account.integration.test.tsapps/ensapi/src/omnigraph-api/schema/account.tsapps/ensapi/src/omnigraph-api/schema/permissions.integration.test.tsapps/ensapi/src/omnigraph-api/schema/permissions.tsapps/ensapi/src/omnigraph-api/schema/query.integration.test.tsapps/ensapi/src/omnigraph-api/schema/query.tsapps/ensapi/src/omnigraph-api/schema/registry-permissions-user.tsapps/ensapi/src/omnigraph-api/schema/registry.tsapps/ensapi/src/omnigraph-api/schema/resolver-permissions-user.tsapps/ensapi/src/omnigraph-api/schema/resolver.tsapps/ensapi/src/omnigraph-api/yoga.tsapps/ensapi/src/test/integration/find-domains/domain-pagination-queries.tsapps/ensapi/src/test/integration/find-events/event-pagination-queries.tsapps/ensindexer/package.jsonapps/ensindexer/src/lib/ensv2/event-db-helpers.tsapps/ensindexer/src/lib/ensv2/registration-db-helpers.tsapps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.tsapps/ensindexer/src/lib/tokenscope/nft-issuers.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv1/RegistrarController.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.tsapps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.tsapps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.tsapps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.tsapps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.tsapps/ensindexer/src/plugins/registrars/basenames/handlers/Basenames_Registrar.tsapps/ensindexer/src/plugins/registrars/ethnames/handlers/Ethnames_Registrar.tsapps/ensindexer/src/plugins/registrars/lineanames/handlers/Lineanames_Registrar.tsapps/ensindexer/src/plugins/registrars/shared/lib/registrar-action.tsapps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.tsapps/ensindexer/src/plugins/registrars/shared/lib/registration-lifecycle.tsapps/ensindexer/src/plugins/registrars/shared/lib/subregistry.tsapps/ensindexer/src/plugins/subgraph/plugins/basenames/handlers/Registrar.tsapps/ensindexer/src/plugins/subgraph/plugins/lineanames/handlers/Registrar.tsapps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registrar.tsapps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.tsapps/ensindexer/src/plugins/tokenscope/handlers/Seaport.tsapps/ensindexer/src/plugins/tokenscope/lib/handle-nft-transfer.tsexamples/enskit-react-example/src/RegistryView.tsxexamples/enskit-react-example/src/main.tsxpackages/enskit/biome.jsoncpackages/enskit/package.jsonpackages/enskit/src/react/omnigraph/client.tspackages/ensnode-sdk/src/ens/subname-helpers.test.tspackages/ensnode-sdk/src/ens/subname-helpers.tspackages/ensnode-sdk/src/ensv2/index.tspackages/ensnode-sdk/src/index.tspackages/ensnode-sdk/src/omnigraph-api/example-queries.tspackages/ensnode-sdk/src/shared/account-id.test.tspackages/ensnode-sdk/src/shared/interpretation/index.tspackages/ensnode-sdk/src/shared/interpretation/interpret-tokenid.tspackages/ensnode-sdk/src/shared/serialize.tspackages/ensnode-sdk/src/tokenscope/assets.tspackages/enssdk/package.jsonpackages/enssdk/src/index.tspackages/enssdk/src/lib/caip.tspackages/enssdk/src/lib/helpers.test.tspackages/enssdk/src/lib/helpers.tspackages/enssdk/src/lib/ids.tspackages/enssdk/src/lib/index.tspackages/enssdk/src/lib/interpretation/index.tspackages/enssdk/src/lib/interpretation/token-id.tspackages/enssdk/src/omnigraph/index.tspackages/enssdk/src/omnigraph/introspection.tspnpm-workspace.yaml
💤 Files with no reviewable changes (4)
- packages/ensnode-sdk/src/shared/interpretation/index.ts
- packages/ensnode-sdk/src/index.ts
- packages/ensnode-sdk/src/ensv2/index.ts
- packages/ensnode-sdk/src/shared/interpretation/interpret-tokenid.ts
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 123 out of 128 changed files in this pull request and generated 6 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 126 out of 131 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 127 out of 132 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| builder.scalarType("InterpretedLabel", { | ||
| description: "InterpretedLabel represents a @ensnode/ensnode-sdk#InterpretedLabel.", | ||
| serialize: (value: Name) => value, | ||
| parseValue: (value) => |
There was a problem hiding this comment.
In the InterpretedLabel scalar, the serialize function is typed as (value: Name) => value, but the scalar is declared (in builder.ts) to output InterpretedLabel. Typing this as Name weakens type-safety and can mask incorrect values being returned for this scalar. Update the serializer signature/type to use InterpretedLabel (and similarly ensure the parse transform aligns) so the scalar matches the schema contract.
closes #1796
references #1793
Reviewer Focus
packages/enskit/src/react/omnigraph/— new package surface area. graphcache configuration (cache-exchange, local-connection-resolvers) is where most of the complexity lives.packages/enssdk/src/lib/ids.tsandpackages/enssdk/src/lib/caip.ts— id construction and CAIP serialization moved here from ensnode-sdk. verify nothing was lost or changed in behavior.Query.accountandQuery.permissionsnow usebyinput pattern.Problem & Motivation
makeRegistryId,makeENSv1DomainId, etc.) and CAIP serialization (formatAccountId,formatAssetId) lived in ensnode-sdk, but they belong in the lower-level enssdk so both enskit and ensindexer can depend on them without pulling in all of ensnode-sdk.Query.accountandQuery.permissionsdidn't follow theby: { id, ... }input pattern already used byQuery.registryandQuery.resolver, making the API inconsistent and graphcache resolution harder.What Changed (Concrete)
enskitpackage (packages/enskit/src/react/omnigraph/) — urql-basedOmnigraphProvider,useOmnigraphQueryhook, graphcache with schema-driven relay pagination and entity-aware local resolversensnode-sdk/ensv2/ids-libtoenssdk/lib/idsensnode-sdk/shared/serializetoenssdk/lib/caip, renamingformatAccountId→stringifyAccountId,formatAssetId→stringifyAssetIdinterpretTokenIdAsLabelHashandinterpretTokenIdAsNodefromensnode-sdktoenssdk/lib/interpretationuint256ToHex32fromensnode-sdk/ens/subname-helperstoenssdk/lib/helpersgetStorageId→makeStorageIdfor consistency with othermake*constructorsQuery.accountnow acceptsby: { id, address },Query.permissionsacceptsby: { id, contract }— matching existingbypatternDefaultEdgesNullability: false,DefaultNodeNullability: false)enssdkfor moved itemsenskit-react-exampleapp demonstrating domain lookup, registry browsing, and paginationenssdk/omnigraph/index.tsinto separatemodule.tsfile, added integration testDesign & Planning
enskit wraps urql + graphcache rather than building a custom cache, giving us normalized caching and relay pagination with minimal code
localConnectionResolversderives relay pagination resolvers from the introspection schema so they don't need manual maintenance as the schema evolvesid construction logic was moved to enssdk because it's the shared foundation — enskit, ensindexer, and ensnode-sdk all need it
Planning artifacts: Narrative Overhaul: Client Packages #1793
Reviewed / approved by: n/a
Self-Review
enssdk/omnigraph/index.tsfrom inline module to separatemodule.tsformatAccountId/formatAssetId→stringifyAccountId/stringifyAssetId,getStorageId→makeStorageIdensnode-sdk/ensv2/directory,ensnode-sdk/shared/interpretation/interpret-tokenid.ts, removed re-exportsCross-Codebase Alignment
formatAccountId,formatAssetId,getStorageId,interpretTokenId,uint256ToHex32packages/ensnode-sdk/src/tokenscope/zod-schemas.ts(uses AssetId types but doesn't need the moved functions)Downstream & Consumer Impact
consumers of ensnode-sdk who used
formatAccountId,formatAssetId,getStorageId, orinterpretTokenId*will need to import fromenssdkinsteadQuery.account(address:)→Query.account(by: { address: })andQuery.permissions(for:)→Query.permissions(by: { contract: })are breaking GraphQL changesconnection edges and nodes are now non-nullable, which is a schema change visible to all omnigraph consumers
Public APIs affected: omnigraph GraphQL schema, ensnode-sdk exports (removed), enssdk exports (added)
Docs updated: example queries updated to use new
bypatternNaming decisions worth calling out:
stringify*overformat*to align with JS conventions (JSON.stringify,URL.toString)Testing Evidence
Query.*field — these are runtime cache behaviors that are hard to unit test without a full urql test clientScope Reductions
Risk Analysis
byargument destructuring doesn't match the actual schema inputs; breaking GraphQL schema changes for existing omnigraph consumersPre-Review Checklist (Blocking)