EFP Who Follows
These queries read Ethereum Follow Protocol (EFP) data, which
requires the efp plugin
to be enabled on the connected ENSIndexer. It is enabled on the hosted ENSNode 'Alpha' instance.
This query finds the raw EFP list records pointing at an address (any list, including block/mute tags), to answer "which lists follow this address?". Requires the efp plugin.
# Raw record view: includes block/mute and non-primary lists — inspect the tags.# For the validated social graph, prefer Account.efp.followers instead.query EfpWhoFollows($address: Address!) { efp { listRecords(where: { recordData: $address }, first: 25) { totalCount edges { node { tags list { tokenId user } } } } }}{ "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"}{ "data": { "efp": { "listRecords": { "totalCount": 6085, "edges": [ { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [ "top8" ], "list": { "tokenId": "2400", "user": "0x9760721a78fcff74a61440a06dbcb2a0ab2e4f89" } } }, { "node": { "tags": [], "list": { "tokenId": "31294", "user": "0x3a4bbb42c18e1bb24edbd6e00aef4ea023da960c" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "39897", "user": "0x8e79ef9e545fa14e205d89970d50e7caa3456683" } } }, { "node": { "tags": [], "list": { "tokenId": "388", "user": "0xbe4f0cdf3834bd876813a1037137dcfad79acd99" } } }, { "node": { "tags": [], "list": { "tokenId": "55439", "user": "0xe4ab754481e555fdd76d93d85b42dcbf56a8ab1e" } } }, { "node": { "tags": [], "list": { "tokenId": "39191", "user": "0xff2d23446f7726da0512c19525262612c4e83d27" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "16149", "user": "0x225f137127d9067788314bc7fcc1f36746a3c3b5" } } }, { "node": { "tags": [], "list": { "tokenId": "33148", "user": "0x3ce7241a8c5c291e50a0d027dd9badff9db1fd7c" } } }, { "node": { "tags": [], "list": { "tokenId": "5056", "user": "0x52fc2a810b96b333c303e48f95f6f88a2acf5d69" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "52365", "user": "0xb5a9b9e2aec901d1b857138fc93c932f350a60ed" } } }, { "node": { "tags": [], "list": { "tokenId": "55011", "user": "0x2a811f1e11636c144a2a062d3d402245a43d4074" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45610", "user": "0x7f7720bdb2cb5c13dd30a0c8ab8d0dd553b31caa" } } }, { "node": { "tags": [], "list": { "tokenId": "43738", "user": "0xdf095ca41af452ed9ed390d8fac260fbdad20976" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45079", "user": "0x2e6728f76d949753f2e7dcee33f8136cf7e4e5f0" } } } ] } } }}Output matches a point in time snapshot GraphQL response from our alpha ENSNode instance. Live output depends on the configuration of your ENSNode instance and ENS state updates.
import { createEnsNodeClient } from "enssdk/core";import { graphql, omnigraph } from "enssdk/omnigraph";
const client = createEnsNodeClient({ url: process.env.ENSNODE_URL || "https://api.alpha.ensnode.io"}).extend(omnigraph);
const EfpWhoFollowsQuery = graphql(` # Raw record view: includes block/mute and non-primary lists — inspect the tags. # For the validated social graph, prefer Account.efp.followers instead. query EfpWhoFollows($address: Address!) { efp { listRecords(where: { recordData: $address }, first: 25) { totalCount edges { node { tags list { tokenId user } } } } } }`);
const result = await client.omnigraph.query({ query: EfpWhoFollowsQuery, variables: { address: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", },});
if (result.errors) throw new Error(JSON.stringify(result.errors));console.log(JSON.stringify(result.data, null, 2));{ "data": { "efp": { "listRecords": { "totalCount": 6085, "edges": [ { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [ "top8" ], "list": { "tokenId": "2400", "user": "0x9760721a78fcff74a61440a06dbcb2a0ab2e4f89" } } }, { "node": { "tags": [], "list": { "tokenId": "31294", "user": "0x3a4bbb42c18e1bb24edbd6e00aef4ea023da960c" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "39897", "user": "0x8e79ef9e545fa14e205d89970d50e7caa3456683" } } }, { "node": { "tags": [], "list": { "tokenId": "388", "user": "0xbe4f0cdf3834bd876813a1037137dcfad79acd99" } } }, { "node": { "tags": [], "list": { "tokenId": "55439", "user": "0xe4ab754481e555fdd76d93d85b42dcbf56a8ab1e" } } }, { "node": { "tags": [], "list": { "tokenId": "39191", "user": "0xff2d23446f7726da0512c19525262612c4e83d27" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "16149", "user": "0x225f137127d9067788314bc7fcc1f36746a3c3b5" } } }, { "node": { "tags": [], "list": { "tokenId": "33148", "user": "0x3ce7241a8c5c291e50a0d027dd9badff9db1fd7c" } } }, { "node": { "tags": [], "list": { "tokenId": "5056", "user": "0x52fc2a810b96b333c303e48f95f6f88a2acf5d69" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "52365", "user": "0xb5a9b9e2aec901d1b857138fc93c932f350a60ed" } } }, { "node": { "tags": [], "list": { "tokenId": "55011", "user": "0x2a811f1e11636c144a2a062d3d402245a43d4074" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45610", "user": "0x7f7720bdb2cb5c13dd30a0c8ab8d0dd553b31caa" } } }, { "node": { "tags": [], "list": { "tokenId": "43738", "user": "0xdf095ca41af452ed9ed390d8fac260fbdad20976" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45079", "user": "0x2e6728f76d949753f2e7dcee33f8136cf7e4e5f0" } } } ] } } }}Output matches a point in time snapshot GraphQL response from our alpha ENSNode instance. Live output depends on the configuration of your ENSNode instance and ENS state updates.
enssdk package manager setup
# 1. Create projectmkdir -p my-ens-script/src && cd my-ens-scriptnpm init -y && touch src/index.tsnpm pkg set type=module scripts.start="tsx src/index.ts"# 2. Install dependenciesnpm install enssdk@1.16.0 && npm install -D tsx typescript @types/node# 3. Paste the TypeScript snippet above into src/index.ts# 4. RunENSNODE_URL=https://api.alpha.ensnode.io npm startSee the enssdk docs for gql.tada plugin and tsconfig setup.
import { OmnigraphProvider, useOmnigraphQuery, graphql } from "enskit/react/omnigraph";import { createEnsNodeClient } from "enssdk/core";import { omnigraph } from "enssdk/omnigraph";
const client = createEnsNodeClient({ url: import.meta.env.VITE_ENSNODE_URL || "https://api.alpha.ensnode.io"}).extend(omnigraph);
const EfpWhoFollowsQuery = graphql(` # Raw record view: includes block/mute and non-primary lists — inspect the tags. # For the validated social graph, prefer Account.efp.followers instead. query EfpWhoFollows($address: Address!) { efp { listRecords(where: { recordData: $address }, first: 25) { totalCount edges { node { tags list { tokenId user } } } } } }`);
function EfpWhoFollowsResult() { const [result] = useOmnigraphQuery({ query: EfpWhoFollowsQuery, variables: { address: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", }, }); const { data, fetching, error } = result; if (!data && fetching) return <p>Loading…</p>; if (error) return <p>Error: {error.message}</p>; if (!data) return <p>No data returned.</p>; const formatted = JSON.stringify( data, (_, value) => (typeof value === "bigint" ? value.toString() : value), 2, ); return <code>{formatted}</code>;}
export default function App() { return ( <OmnigraphProvider client={client}> <EfpWhoFollowsResult /> </OmnigraphProvider> );}{ "data": { "efp": { "listRecords": { "totalCount": 6085, "edges": [ { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [ "top8" ], "list": { "tokenId": "2400", "user": "0x9760721a78fcff74a61440a06dbcb2a0ab2e4f89" } } }, { "node": { "tags": [], "list": { "tokenId": "31294", "user": "0x3a4bbb42c18e1bb24edbd6e00aef4ea023da960c" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "39897", "user": "0x8e79ef9e545fa14e205d89970d50e7caa3456683" } } }, { "node": { "tags": [], "list": { "tokenId": "388", "user": "0xbe4f0cdf3834bd876813a1037137dcfad79acd99" } } }, { "node": { "tags": [], "list": { "tokenId": "55439", "user": "0xe4ab754481e555fdd76d93d85b42dcbf56a8ab1e" } } }, { "node": { "tags": [], "list": { "tokenId": "39191", "user": "0xff2d23446f7726da0512c19525262612c4e83d27" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "16149", "user": "0x225f137127d9067788314bc7fcc1f36746a3c3b5" } } }, { "node": { "tags": [], "list": { "tokenId": "33148", "user": "0x3ce7241a8c5c291e50a0d027dd9badff9db1fd7c" } } }, { "node": { "tags": [], "list": { "tokenId": "5056", "user": "0x52fc2a810b96b333c303e48f95f6f88a2acf5d69" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "52365", "user": "0xb5a9b9e2aec901d1b857138fc93c932f350a60ed" } } }, { "node": { "tags": [], "list": { "tokenId": "55011", "user": "0x2a811f1e11636c144a2a062d3d402245a43d4074" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45610", "user": "0x7f7720bdb2cb5c13dd30a0c8ab8d0dd553b31caa" } } }, { "node": { "tags": [], "list": { "tokenId": "43738", "user": "0xdf095ca41af452ed9ed390d8fac260fbdad20976" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45079", "user": "0x2e6728f76d949753f2e7dcee33f8136cf7e4e5f0" } } } ] } } }}Output matches a point in time snapshot GraphQL response from our alpha ENSNode instance. Live output depends on the configuration of your ENSNode instance and ENS state updates.
enskit package manager setup
# 1. Create projectnpm create vite@latest my-ens-app -- --template react-ts --no-interactive --no-immediatecd my-ens-app# 2. Install dependenciesnpm installnpm install enskit@1.16.0 enssdk@1.16.0# 3. Copy the TSX snippet above into src/App.tsx# 4. RunVITE_ENSNODE_URL=https://api.alpha.ensnode.io npm run devSee the enskit docs for gql.tada plugin and provider setup.
# POST JSON to your ENSNode Omnigraph endpoint (same path enssdk uses).curl -sS -X POST "https://api.alpha.ensnode.io/api/omnigraph" \ -H "Content-Type: application/json" \ -d '{ "query": "query EfpWhoFollows($address: Address!) { efp { listRecords(where: { recordData: $address }, first: 25) { totalCount edges { node { tags list { tokenId user } } } } } }", "variables": {"address":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"}}'{ "data": { "efp": { "listRecords": { "totalCount": 6085, "edges": [ { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [ "top8" ], "list": { "tokenId": "2400", "user": "0x9760721a78fcff74a61440a06dbcb2a0ab2e4f89" } } }, { "node": { "tags": [], "list": { "tokenId": "31294", "user": "0x3a4bbb42c18e1bb24edbd6e00aef4ea023da960c" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "39897", "user": "0x8e79ef9e545fa14e205d89970d50e7caa3456683" } } }, { "node": { "tags": [], "list": { "tokenId": "388", "user": "0xbe4f0cdf3834bd876813a1037137dcfad79acd99" } } }, { "node": { "tags": [], "list": { "tokenId": "55439", "user": "0xe4ab754481e555fdd76d93d85b42dcbf56a8ab1e" } } }, { "node": { "tags": [], "list": { "tokenId": "39191", "user": "0xff2d23446f7726da0512c19525262612c4e83d27" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "16149", "user": "0x225f137127d9067788314bc7fcc1f36746a3c3b5" } } }, { "node": { "tags": [], "list": { "tokenId": "33148", "user": "0x3ce7241a8c5c291e50a0d027dd9badff9db1fd7c" } } }, { "node": { "tags": [], "list": { "tokenId": "5056", "user": "0x52fc2a810b96b333c303e48f95f6f88a2acf5d69" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "52365", "user": "0xb5a9b9e2aec901d1b857138fc93c932f350a60ed" } } }, { "node": { "tags": [], "list": { "tokenId": "55011", "user": "0x2a811f1e11636c144a2a062d3d402245a43d4074" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45610", "user": "0x7f7720bdb2cb5c13dd30a0c8ab8d0dd553b31caa" } } }, { "node": { "tags": [], "list": { "tokenId": "43738", "user": "0xdf095ca41af452ed9ed390d8fac260fbdad20976" } } }, { "node": { "tags": [], "list": null } }, { "node": { "tags": [], "list": { "tokenId": "45079", "user": "0x2e6728f76d949753f2e7dcee33f8136cf7e4e5f0" } } } ] } } }}Output matches a point in time snapshot GraphQL response from our alpha ENSNode instance. Live output depends on the configuration of your ENSNode instance and ENS state updates.
Back to Examples