Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/omnigraph-domain-resolver-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ensnode/ensnode-sdk": patch
---

add two ENSv1 → ENSv2 migration Omnigraph examples: `account-migrated-names` (ENSv1 vs ENSv2 domain counts for an account) and `eth-by-version` (the .eth TLD across protocol versions, one Domain per version discriminated by `__typename`).

also fix the `domain-resolver` example: `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` now points to `demomigration.eth`, which has an owned resolver with records/permissions/events. The previous name (`sfmonicdebmig.eth`) had no owned resolver, so the example rendered `resolver.assigned: null`.
Comment on lines +5 to +7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Keep the changeset body as a single paragraph.

The description is currently split into two paragraphs; please keep it as one terse paragraph to match repo convention.

♻️ Proposed edit
-add two ENSv1 → ENSv2 migration Omnigraph examples: `account-migrated-names` (ENSv1 vs ENSv2 domain counts for an account) and `eth-by-version` (the .eth TLD across protocol versions, one Domain per version discriminated by `__typename`).
-
-also fix the `domain-resolver` example: `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` now points to `demomigration.eth`, which has an owned resolver with records/permissions/events. The previous name (`sfmonicdebmig.eth`) had no owned resolver, so the example rendered `resolver.assigned: null`.
+add two ENSv1 → ENSv2 migration Omnigraph examples: `account-migrated-names` (ENSv1 vs ENSv2 domain counts for an account) and `eth-by-version` (the .eth TLD across protocol versions, one Domain per version discriminated by `__typename`), and fix the `domain-resolver` example: `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` now points to `demomigration.eth`, which has an owned resolver with records/permissions/events; the previous name (`sfmonicdebmig.eth`) had no owned resolver, so the example rendered `resolver.assigned: null`.

Based on learnings: In this repository’s .changeset markdown files, keep the changeset description as a terse, single-paragraph write-up.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
add two ENSv1 → ENSv2 migration Omnigraph examples: `account-migrated-names` (ENSv1 vs ENSv2 domain counts for an account) and `eth-by-version` (the .eth TLD across protocol versions, one Domain per version discriminated by `__typename`).
also fix the `domain-resolver` example: `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` now points to `demomigration.eth`, which has an owned resolver with records/permissions/events. The previous name (`sfmonicdebmig.eth`) had no owned resolver, so the example rendered `resolver.assigned: null`.
add two ENSv1 → ENSv2 migration Omnigraph examples: `account-migrated-names` (ENSv1 vs ENSv2 domain counts for an account) and `eth-by-version` (the .eth TLD across protocol versions, one Domain per version discriminated by `__typename`), and fix the `domain-resolver` example: `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` now points to `demomigration.eth`, which has an owned resolver with records/permissions/events; the previous name (`sfmonicdebmig.eth`) had no owned resolver, so the example rendered `resolver.assigned: null`.
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 5-5: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/omnigraph-domain-resolver-example.md around lines 5 - 7, The
changeset description is split into two paragraphs; combine them into a single
terse paragraph so the body remains one-line per repo convention, e.g., merge
the sentences about adding two ENSv1 → ENSv2 migration Omnigraph examples
(`account-migrated-names`, `eth-by-version`) and the fix to the
`domain-resolver` example (update `SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER` to
`demomigration.eth` instead of `sfmonicdebmig.eth`) into one continuous
paragraph without extra line breaks.

Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ if (argIds.length > 0) {

const exampleIds = argIds.length > 0 ? argIds : allExampleIds;

const base = ENSNODE_URL.replace(/\/+$/, "");
const url = `${base}/api/omnigraph`;
// Endpoint defaults to the production v2 Sepolia URL; override to fill responses from a
// staged deployment (e.g. blue/green) before that version is promoted to the prod URL.
const url = new URL("/api/omnigraph", process.env.OMNIGRAPH_ENDPOINT ?? ENSNODE_URL).toString();
Comment thread
shrugs marked this conversation as resolved.

logStep(
argIds.length > 0
Expand Down
11 changes: 11 additions & 0 deletions docs/ensnode.io/src/data/omnigraph-examples/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,15 @@ export const OMNIGRAPH_EXAMPLES_META: Record<
description: "Walk the root tree: root → domains → nested subdomains (depth-limited).",
category: "Exploration",
},
"account-migrated-names": {
name: "Account Migration Counts",
description: "Count an account's ENSv1 vs ENSv2 domains to gauge its migration progress.",
category: "Migration",
},
"eth-by-version": {
name: "ETH TLD By Version",
description:
"Load the .eth TLD across protocol versions: one Domain per version, discriminated by `__typename` (ENSv1Domain / ENSv2Domain).",
category: "Migration",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"sdkVersion": "0.0.0-preview-fix-sha-89c022b-20260519094840",
"schemaTag": "v1.13.1",
"endpoint": "https://api.v2-sepolia.ensnode.io",
"snapshottedAt": "2026-05-21",
"note": "Bootstrap snapshot. v1.13.1 predates the Omnigraph examples feature, so examples + responses were frozen from the production-pinned SDK preview (which validates 13/13 against the v1.13.1 schema), not from the v1.13.1 release commit."
"snapshottedAt": "2026-05-21"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
[
{
"id": "hello-world",
"query": "#\n# Welcome to this interactive playground for\n# ENSNode's GraphQL API!\n#\n# You can get started by typing your query here or by using\n# the Explorer on the left to select the data you want to query.\n#\n# There are also example queries in the tabs above ☝️\nquery HelloWorld {\n domain(by: { name: \"eth\" }) { canonical { name { interpreted } } owner { address } }\n}",
"variables": {}
},
{
"id": "find-domains",
"query": "query FindDomains(\n $name: DomainsNameFilter!\n $order: DomainsOrderInput\n) {\n domains(\n where: { name: $name }\n order: $order\n first: 20\n ) {\n edges {\n node {\n __typename\n id\n label { interpreted hash }\n canonical { name { interpreted } }\n\n registration { expiry event { timestamp } }\n }\n }\n }\n}",
"variables": {
"name": {
"starts_with": "test-na"
},
"order": {
"by": "NAME",
"dir": "DESC"
}
}
},
{
"id": "domain-by-name",
"query": "query DomainByName($name: InterpretedName!) {\n domain(by: {name: $name}) {\n __typename\n id\n label { interpreted hash }\n canonical { name { interpreted } node path { id } }\n owner { address }\n subregistry { contract { chainId address } }\n\n ... on ENSv1Domain {\n rootRegistryOwner { address }\n }\n }\n}",
"variables": {
"name": "test-name.eth"
}
},
{
"id": "domain-subdomains",
"query": "query DomainSubdomains($name: InterpretedName!) {\n domain(by: {name: $name}) {\n canonical { name { interpreted } }\n subdomains(first: 10) {\n edges {\n node {\n canonical { name { interpreted } }\n }\n }\n }\n }\n}",
"variables": {
"name": "eth"
}
},
{
"id": "domain-events",
"query": "query DomainEvents($name: InterpretedName!) {\n domain(by: {name: $name}) {\n events {\n totalCount\n edges {\n node {\n from\n to\n topics\n data\n timestamp\n transactionHash\n }\n }\n }\n }\n}",
"variables": {
"name": "sfmonicdebmig.eth"
}
},
{
"id": "domains-by-address",
"query": "query AccountDomains(\n $address: Address!\n) {\n account(by: { address: $address }) {\n domains {\n edges {\n node {\n label { interpreted }\n canonical { name { interpreted } }\n }\n }\n }\n }\n}",
"variables": {
"address": "0x205d2686da3bf33f64c17f21462c51b5ead462cf"
}
},
{
"id": "account-events",
"query": "query AccountEvents(\n $address: Address!\n) {\n account(by: { address: $address }) {\n events { totalCount edges { node { topics data timestamp } } }\n }\n}",
"variables": {
"address": "0x205d2686da3bf33f64c17f21462c51b5ead462cf"
}
},
{
"id": "registry-domains",
"query": "query RegistryDomains(\n $registry: AccountIdInput!\n) {\n registry(by: { contract: $registry }) {\n domains {\n edges {\n node {\n label { interpreted }\n canonical { name { interpreted } }\n }\n }\n }\n }\n}",
"variables": {
"registry": {
"chainId": 99911155111,
"address": "0x31a2bb5d933557cce1b3129993193896d074db92"
}
}
},
{
"id": "permissions-by-contract",
"query": "query PermissionsByContract(\n $contract: AccountIdInput!\n) {\n permissions(by: { contract: $contract }) {\n resources {\n edges {\n node {\n resource\n users {\n edges {\n node {\n id\n user { address }\n roles\n }\n }\n }\n }\n }\n }\n events { totalCount edges { node { topics data timestamp } } }\n }\n}",
"variables": {
"contract": {
"chainId": 99911155111,
"address": "0x26e5e80e8f36607ef401443fb34eea363c86e8f7"
}
}
},
{
"id": "permissions-by-user",
"query": "query PermissionsByUser($address: Address!) {\n account(by: { address: $address }) {\n permissions {\n edges {\n node {\n resource\n roles\n }\n }\n }\n }\n}",
"variables": {
"address": "0x205d2686da3bf33f64c17f21462c51b5ead462cf"
}
},
{
"id": "account-resolver-permissions",
"query": "query AccountResolverPermissions($address: Address!) {\n account(by: { address: $address }) {\n resolverPermissions {\n edges {\n node {\n resolver {\n contract {\n address\n }\n }\n }\n }\n }\n }\n}",
"variables": {
"address": "0x205d2686da3bf33f64c17f21462c51b5ead462cf"
}
},
{
"id": "domain-resolver",
"query": "query DomainResolver($name: InterpretedName!) {\n domain(by: { name: $name }) {\n resolver {\n assigned {\n records { edges { node { node keys coinTypes } } }\n permissions { resources { edges { node { resource users { edges { node { user { address } roles } } } } } } }\n events { totalCount edges { node { topics data timestamp } } }\n }\n }\n }\n}",
"variables": {
"name": "demomigration.eth"
}
},
{
"id": "namegraph",
"query": "query Namegraph {\n root {\n id\n domains {\n edges {\n node {\n canonical { name { interpreted } }\n\n subdomains {\n edges {\n node {\n canonical { name { interpreted } }\n\n subdomains {\n edges {\n node {\n canonical { name { interpreted } }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}",
"variables": {}
},
{
"id": "account-migrated-names",
"query": "query AccountMigratedNames($address: Address!) {\n account(by: { address: $address }) {\n v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }\n v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }\n }\n}",
"variables": {
"address": "0x2f8e8b1126e75fde0b7f731e7cb5847eba2d2574"
}
},
{
"id": "eth-by-version",
"query": "query GetEthDomains {\n domains(where: { name: { eq: \"eth\" } }) {\n edges {\n node {\n __typename\n id\n }\n }\n }\n}",
"variables": {}
}
]
Loading
Loading