Skip to content

Commit 84ad60d

Browse files
authored
feat(docs): snapshot v1.14.1 Omnigraph examples (#2177)
1 parent e770d83 commit 84ad60d

11 files changed

Lines changed: 7687 additions & 32 deletions

File tree

docs/ensnode.io/scripts/fetch-omnigraph-example-responses.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ if (argIds.length > 0) {
6060

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

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

6667
logStep(
6768
argIds.length > 0

docs/ensnode.io/src/data/omnigraph-examples/examples.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ENSNODE_URL } from "src/lib/playground/constants";
12
import { OmnigraphExampleQuerySchema, type OmnigraphExampleQuery } from "src/lib/playground/types";
23

34
import { ACTIVE_OMNIGRAPH_VERSION } from "./active";
@@ -42,8 +43,7 @@ export const graphqlApiOmnigraphExamples: OmnigraphExampleQuery[] = Object.entri
4243
query: example.query.trim(),
4344
variables: example.variables,
4445
...(response ? { response } : {}),
45-
// NOTE: always pointing at production url
46-
connection: "https://api.v2-sepolia.ensnode.io",
46+
connection: ENSNODE_URL,
4747
}),
4848
];
4949
});

docs/ensnode.io/src/data/omnigraph-examples/meta.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,15 @@ export const OMNIGRAPH_EXAMPLES_META: Record<
6868
description: "Walk the root tree: root → domains → nested subdomains (depth-limited).",
6969
category: "Exploration",
7070
},
71+
"account-migrated-names": {
72+
name: "Account Migration Counts",
73+
description: "Count an account's ENSv1 vs ENSv2 domains to gauge its migration progress.",
74+
category: "Migration",
75+
},
76+
"eth-by-version": {
77+
name: "ETH TLD By Version",
78+
description:
79+
"Load the .eth TLD across protocol versions: one Domain per version, discriminated by `__typename` (ENSv1Domain / ENSv2Domain).",
80+
category: "Migration",
81+
},
7182
};

docs/ensnode.io/src/data/omnigraph-examples/versions/v1.13.1/snapshot.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
"sdkVersion": "0.0.0-preview-fix-sha-89c022b-20260519094840",
55
"schemaTag": "v1.13.1",
66
"endpoint": "https://api.v2-sepolia.ensnode.io",
7-
"snapshottedAt": "2026-05-21",
8-
"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."
7+
"snapshottedAt": "2026-05-21"
98
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
[
2+
{
3+
"id": "hello-world",
4+
"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 beautified } } owner { address } }\n}",
5+
"variables": {}
6+
},
7+
{
8+
"id": "find-domains",
9+
"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 beautified } }\n\n registration { expiry event { timestamp } }\n }\n }\n }\n}",
10+
"variables": {
11+
"name": {
12+
"starts_with": "test-na"
13+
},
14+
"order": {
15+
"by": "NAME",
16+
"dir": "DESC"
17+
}
18+
}
19+
},
20+
{
21+
"id": "domain-by-name",
22+
"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}",
23+
"variables": {
24+
"name": "test-name.eth"
25+
}
26+
},
27+
{
28+
"id": "domain-registration",
29+
"query": "query DomainRegistration($name: InterpretedName!) {\n domain(by: { name: $name }) {\n canonical { name { interpreted } }\n\n registration {\n __typename\n id\n start\n expiry\n expired\n referrer\n registrar { chainId address }\n registrant { address }\n renewals(first: 5) {\n totalCount\n edges { node { duration base premium referrer } }\n }\n\n # ENSv1 .eth registrations (also Basenames & Lineanames)\n ... on BaseRegistrarRegistration {\n baseCost\n premium\n isInGracePeriod\n # present when the .eth name is wrapped by the NameWrapper\n wrapped { fuses tokenId }\n }\n\n # names held natively in the NameWrapper\n ... on NameWrapperRegistration {\n fuses\n }\n }\n }\n}",
30+
"variables": {
31+
"name": "test-name.eth"
32+
}
33+
},
34+
{
35+
"id": "domain-subdomains",
36+
"query": "query DomainSubdomains($name: InterpretedName!) {\n domain(by: {name: $name}) {\n canonical { name { interpreted beautified } }\n subdomains(first: 10) {\n edges {\n node {\n canonical { name { interpreted beautified } }\n }\n }\n }\n }\n}",
37+
"variables": {
38+
"name": "eth"
39+
}
40+
},
41+
{
42+
"id": "subdomains-pagination",
43+
"query": "query SubdomainsPagination($first: Int!, $after: String) {\n domain(by: { name: \"eth\" }) {\n canonical { name { interpreted } }\n\n # paginate child names: pass pageInfo.endCursor back as $after for the next page\n subdomains(first: $first, after: $after) {\n totalCount\n pageInfo { hasNextPage endCursor }\n edges {\n cursor\n node {\n canonical { name { interpreted } }\n }\n }\n }\n }\n}",
44+
"variables": {
45+
"first": 10,
46+
"after": null
47+
}
48+
},
49+
{
50+
"id": "domain-events",
51+
"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}",
52+
"variables": {
53+
"name": "test-name.eth"
54+
}
55+
},
56+
{
57+
"id": "domains-by-address",
58+
"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 beautified } }\n }\n }\n }\n }\n}",
59+
"variables": {
60+
"address": "0x69696969c3b3ca102eeb5c53a065a7c3ae4fb6dd"
61+
}
62+
},
63+
{
64+
"id": "account-events",
65+
"query": "query AccountEvents(\n $address: Address!\n) {\n account(by: { address: $address }) {\n events { totalCount edges { node { topics data timestamp } } }\n }\n}",
66+
"variables": {
67+
"address": "0x69696969c3b3ca102eeb5c53a065a7c3ae4fb6dd"
68+
}
69+
},
70+
{
71+
"id": "registry-domains",
72+
"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 beautified } }\n }\n }\n }\n }\n}",
73+
"variables": {
74+
"registry": {
75+
"chainId": 99911155111,
76+
"address": "0xc328a01a4800fb52ec5a6ab4190356962ab719e5"
77+
}
78+
}
79+
},
80+
{
81+
"id": "permissions-by-contract",
82+
"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}",
83+
"variables": {
84+
"contract": {
85+
"chainId": 99911155111,
86+
"address": "0xc328a01a4800fb52ec5a6ab4190356962ab719e5"
87+
}
88+
}
89+
},
90+
{
91+
"id": "permissions-by-user",
92+
"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}",
93+
"variables": {
94+
"address": "0x4c65a1c8d330ce1c3f60e00cd55709ba5fe2e090"
95+
}
96+
},
97+
{
98+
"id": "account-resolver-permissions",
99+
"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}",
100+
"variables": {
101+
"address": "0x69696969c3b3ca102eeb5c53a065a7c3ae4fb6dd"
102+
}
103+
},
104+
{
105+
"id": "domain-resolver",
106+
"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}",
107+
"variables": {
108+
"name": "test-name.eth"
109+
}
110+
},
111+
{
112+
"id": "resolver-by-address",
113+
"query": "query ResolverByAddress($contract: AccountIdInput!) {\n resolver(by: { contract: $contract }) {\n id\n contract { chainId address }\n\n # records this resolver stores, keyed by node\n records(first: 5) {\n totalCount\n edges {\n node {\n node\n name\n keys\n coinTypes\n }\n }\n }\n\n events { totalCount edges { node { topics data timestamp } } }\n }\n}",
114+
"variables": {
115+
"contract": {
116+
"chainId": 99911155111,
117+
"address": "0xe99638b40e4fff0129d56f03b55b6bbc4bbe49b5"
118+
}
119+
}
120+
},
121+
{
122+
"id": "namegraph",
123+
"query": "query Namegraph {\n root {\n id\n domains {\n edges {\n node {\n canonical { name { interpreted beautified } }\n\n subdomains {\n edges {\n node {\n canonical { name { interpreted beautified } }\n\n subdomains {\n edges {\n node {\n canonical { name { interpreted beautified } }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}",
124+
"variables": {}
125+
},
126+
{
127+
"id": "account-migrated-names",
128+
"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}",
129+
"variables": {
130+
"address": "0x69696969c3b3ca102eeb5c53a065a7c3ae4fb6dd"
131+
}
132+
},
133+
{
134+
"id": "eth-by-version",
135+
"query": "query GetEthDomains {\n domains(where: { name: { eq: \"eth\" } }) {\n edges {\n node {\n __typename\n id\n }\n }\n }\n}",
136+
"variables": {}
137+
}
138+
]

0 commit comments

Comments
 (0)