How to query ENS domains from my database/TheGraph?

Hey guys,

I am currently building a dapp which allows people to register subdomains for certain domains which I own.

I am going to be setting up all the domains with a single registrar, and I’d like to know how exactly I should query the necessary info (domain names associated with the registrar in particular) so that I don’t have to manually fill out a database, and can easily add new names.

I believe I have to use TheGraph, but haven’t been able to find much info regarding this. Would love some info on getting started and would be great if I could be pointed to some sample repos (if there are).


1 Like

The ENS subgraph on Goerli is here: ensGoerli Subgraph

That will not be specific to your registrar of course, it is for all ENS names in general.

Your contract emits NameRegistered/NameRenewed events though, so you could index those yourself. If you want to create a subgraph for it, TheGraph has documentation here: The Graph Docs