Skip to content

Domain By Name

Load a domain by interpreted name, including v1/v2 discriminated fields and subregistry on ENSv2.
Run in ENSAdmin
GraphQL
query DomainByName($name: InterpretedName!) {
domain(by: {name: $name}) {
__typename
id
label { interpreted hash }
name
owner { address }
... on ENSv1Domain {
rootRegistryOwner { address }
}
... on ENSv2Domain {
subregistry {
contract { chainId address }
}
}
}
}
Variables
{
"name": "test-name.eth"
}
Output
{
"data": {
"domain": {
"__typename": "ENSv2Domain",
"id": "99911155111-0x31a2bb5d933557cce1b3129993193896d074db92-18650549467948381174706470291653511222307197070371999253038345217664991887360",
"label": {
"interpreted": "test-name",
"hash": "0x293bd640008c5863fbe17a08ae5df5b2484357f5dc95e0fdd089f85e7edbfe5a"
},
"owner": null,
"subregistry": null,
"name": "test-name.eth"
}
}
}

Output matches a GraphQL Response snapshot; live output depends on your ENSNode instance.

Back to Examples