Domain By Name
Load a domain by interpreted name, including v1/v2 discriminated fields and subregistry on ENSv2.
Run in ENSAdmin
Open an interactive playground to execute this query on our sepolia-v2
ENSNode instance.
query DomainByName($name: InterpretedName!) {
domain(by: {name: $name}) {
__typename
id
label { interpreted hash }
canonical { name { interpreted } node path { id } }
owner { address }
subregistry { contract { chainId address } }
... on ENSv1Domain {
rootRegistryOwner { address }
}
}
} {
"name": "test-name.eth"
} {
"data": {
"domain": {
"__typename": "ENSv2Domain",
"id": "99911155111-0x31a2bb5d933557cce1b3129993193896d074db92-18650549467948381174706470291653511222307197070371999253038345217664991887360",
"label": {
"interpreted": "test-name",
"hash": "0x293bd640008c5863fbe17a08ae5df5b2484357f5dc95e0fdd089f85e7edbfe5a"
},
"owner": null,
"subregistry": null,
"name": "test-name.eth"
}
}
} # POST JSON to your ENSNode Omnigraph endpoint (same path enssdk uses).
curl -sS -X POST "https://api.v2-sepolia.ensnode.io/api/omnigraph" \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"query": "query DomainByName($name: InterpretedName!) { domain(by: {name: $name}) { __typename id label { interpreted hash } canonical { name { interpreted } node path { id } } owner { address } subregistry { contract { chainId address } } ... on ENSv1Domain { rootRegistryOwner { address } } } }",
"variables": {
"name": "test-name.eth"
}
}
EOF
ENS Omnigraph GraphQL
query DomainByName($name: InterpretedName!) { domain(by: {name: $name}) { __typename id label { interpreted hash } canonical { name { interpreted } node path { id } } owner { address } subregistry { contract { chainId address } }
... on ENSv1Domain { rootRegistryOwner { address } } }}Payload and transport examples
{ "name": "test-name.eth"}
Response is an illustrative snapshot; live data depends on your ENSNode instance. The curl tab shows a POST to
https://api.v2-sepolia.ensnode.io/api/omnigraph