EFP List
This query reads 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 loads an EFP list by tokenId — its roles, storage location, and raw records with tags. Requires the efp plugin.
query EfpList($tokenId: TokenId!) { efp { list(by: { tokenId: $tokenId }) { tokenId owner user manager storageLocation { chainId address slot } # Raw records (any tag, no primary-list validation). records(first: 25) { totalCount edges { node { recordData tags } } } } }}{ "tokenId": "1"}{ "data": { "efp": { "list": { "tokenId": "1", "owner": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "user": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "manager": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "storageLocation": { "chainId": 8453, "address": "0x41aa48ef3c0446b46a5b1cc6337ff3d3716e2a33", "slot": "0x5659892f4e1f565ebd9f7504a28177ca927325e4104d0c6787c7e8a00dcda60c" }, "records": { "totalCount": 452, "edges": [ { "node": { "recordData": "0x0000ce08fa224696a819877070bf378e8b131acf", "tags": [] } }, { "node": { "recordData": "0x000f16ca1e73a0b6b10e1ed4cc5f8232336c1482", "tags": [] } }, { "node": { "recordData": "0x009ae2d1a7240cfc89095fab06ed24f1641d9169", "tags": [] } }, { "node": { "recordData": "0x00c7ecc4187f239e09d4cfea5abe6d3c18f923bc", "tags": [] } }, { "node": { "recordData": "0x021021ccee934b346160342f8d7f59f514c08c56", "tags": [] } }, { "node": { "recordData": "0x025376e7e7f161a198fb5fc90a220a553836d11a", "tags": [] } }, { "node": { "recordData": "0x027fc636db3ced7342581baed6eee79f7d1123c3", "tags": [] } }, { "node": { "recordData": "0x02c5b7c40daaaf3aac3dd2ff39013cdd0f1fb4ae", "tags": [] } }, { "node": { "recordData": "0x0331969e189d63fbc31d771bb04ab44227d748d8", "tags": [] } }, { "node": { "recordData": "0x035ebd096afa6b98372494c7f08f3402324117d3", "tags": [] } }, { "node": { "recordData": "0x041d311ac26e478ea6e1753ec354676c452db9d8", "tags": [] } }, { "node": { "recordData": "0x0446bc2beabb16aa542cd99eaff3e63af37125b4", "tags": [] } }, { "node": { "recordData": "0x049569adb8a1e8a9349e9f1111c7b7993a4612eb", "tags": [] } }, { "node": { "recordData": "0x054becf10c79afa4e60f75b187837be9fb83867d", "tags": [] } }, { "node": { "recordData": "0x05977b2fb9b7ab3f3733b34350044a01a388579c", "tags": [] } }, { "node": { "recordData": "0x05a1ff0a32bc24265bcb39499d0c5d9a6cb2011c", "tags": [] } }, { "node": { "recordData": "0x06ce84f051ce93c2fe99344bc8c9d2bf92e64409", "tags": [] } }, { "node": { "recordData": "0x074470b9a32f68de86fac393a10d5cea01c54269", "tags": [] } }, { "node": { "recordData": "0x0865c5de7fe349aa5b7f6ef721f8c2b9cfe5e40d", "tags": [] } }, { "node": { "recordData": "0x092ad3842dced68b5b6ef9cc602be66924baecdd", "tags": [] } }, { "node": { "recordData": "0x09a78e1abe7a893c43986dbf7864c79d03860bde", "tags": [] } }, { "node": { "recordData": "0x0c077910e1dc0b5bea1054cce14143e0971f95ce", "tags": [] } }, { "node": { "recordData": "0x0d1f2c041b7f9702903b89057c1f57f1f01a79af", "tags": [] } }, { "node": { "recordData": "0x0d3f5a7a1ee78e743e25c18e66942fcbcd84ccad", "tags": [] } }, { "node": { "recordData": "0x0de5a5d50453e702ad66d3fcf7c986f408019ffd", "tags": [] } } ] } } } }}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 EfpListQuery = graphql(` query EfpList($tokenId: TokenId!) { efp { list(by: { tokenId: $tokenId }) { tokenId owner user manager storageLocation { chainId address slot } # Raw records (any tag, no primary-list validation). records(first: 25) { totalCount edges { node { recordData tags } } } } } }`);
const result = await client.omnigraph.query({ query: EfpListQuery, variables: { tokenId: "1", },});
if (result.errors) throw new Error(JSON.stringify(result.errors));console.log(JSON.stringify(result.data, null, 2));{ "data": { "efp": { "list": { "tokenId": "1", "owner": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "user": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "manager": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "storageLocation": { "chainId": 8453, "address": "0x41aa48ef3c0446b46a5b1cc6337ff3d3716e2a33", "slot": "0x5659892f4e1f565ebd9f7504a28177ca927325e4104d0c6787c7e8a00dcda60c" }, "records": { "totalCount": 452, "edges": [ { "node": { "recordData": "0x0000ce08fa224696a819877070bf378e8b131acf", "tags": [] } }, { "node": { "recordData": "0x000f16ca1e73a0b6b10e1ed4cc5f8232336c1482", "tags": [] } }, { "node": { "recordData": "0x009ae2d1a7240cfc89095fab06ed24f1641d9169", "tags": [] } }, { "node": { "recordData": "0x00c7ecc4187f239e09d4cfea5abe6d3c18f923bc", "tags": [] } }, { "node": { "recordData": "0x021021ccee934b346160342f8d7f59f514c08c56", "tags": [] } }, { "node": { "recordData": "0x025376e7e7f161a198fb5fc90a220a553836d11a", "tags": [] } }, { "node": { "recordData": "0x027fc636db3ced7342581baed6eee79f7d1123c3", "tags": [] } }, { "node": { "recordData": "0x02c5b7c40daaaf3aac3dd2ff39013cdd0f1fb4ae", "tags": [] } }, { "node": { "recordData": "0x0331969e189d63fbc31d771bb04ab44227d748d8", "tags": [] } }, { "node": { "recordData": "0x035ebd096afa6b98372494c7f08f3402324117d3", "tags": [] } }, { "node": { "recordData": "0x041d311ac26e478ea6e1753ec354676c452db9d8", "tags": [] } }, { "node": { "recordData": "0x0446bc2beabb16aa542cd99eaff3e63af37125b4", "tags": [] } }, { "node": { "recordData": "0x049569adb8a1e8a9349e9f1111c7b7993a4612eb", "tags": [] } }, { "node": { "recordData": "0x054becf10c79afa4e60f75b187837be9fb83867d", "tags": [] } }, { "node": { "recordData": "0x05977b2fb9b7ab3f3733b34350044a01a388579c", "tags": [] } }, { "node": { "recordData": "0x05a1ff0a32bc24265bcb39499d0c5d9a6cb2011c", "tags": [] } }, { "node": { "recordData": "0x06ce84f051ce93c2fe99344bc8c9d2bf92e64409", "tags": [] } }, { "node": { "recordData": "0x074470b9a32f68de86fac393a10d5cea01c54269", "tags": [] } }, { "node": { "recordData": "0x0865c5de7fe349aa5b7f6ef721f8c2b9cfe5e40d", "tags": [] } }, { "node": { "recordData": "0x092ad3842dced68b5b6ef9cc602be66924baecdd", "tags": [] } }, { "node": { "recordData": "0x09a78e1abe7a893c43986dbf7864c79d03860bde", "tags": [] } }, { "node": { "recordData": "0x0c077910e1dc0b5bea1054cce14143e0971f95ce", "tags": [] } }, { "node": { "recordData": "0x0d1f2c041b7f9702903b89057c1f57f1f01a79af", "tags": [] } }, { "node": { "recordData": "0x0d3f5a7a1ee78e743e25c18e66942fcbcd84ccad", "tags": [] } }, { "node": { "recordData": "0x0de5a5d50453e702ad66d3fcf7c986f408019ffd", "tags": [] } } ] } } } }}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 EfpListQuery = graphql(` query EfpList($tokenId: TokenId!) { efp { list(by: { tokenId: $tokenId }) { tokenId owner user manager storageLocation { chainId address slot } # Raw records (any tag, no primary-list validation). records(first: 25) { totalCount edges { node { recordData tags } } } } } }`);
function EfpListResult() { const [result] = useOmnigraphQuery({ query: EfpListQuery, variables: { tokenId: "1", }, }); 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}> <EfpListResult /> </OmnigraphProvider> );}{ "data": { "efp": { "list": { "tokenId": "1", "owner": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "user": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "manager": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "storageLocation": { "chainId": 8453, "address": "0x41aa48ef3c0446b46a5b1cc6337ff3d3716e2a33", "slot": "0x5659892f4e1f565ebd9f7504a28177ca927325e4104d0c6787c7e8a00dcda60c" }, "records": { "totalCount": 452, "edges": [ { "node": { "recordData": "0x0000ce08fa224696a819877070bf378e8b131acf", "tags": [] } }, { "node": { "recordData": "0x000f16ca1e73a0b6b10e1ed4cc5f8232336c1482", "tags": [] } }, { "node": { "recordData": "0x009ae2d1a7240cfc89095fab06ed24f1641d9169", "tags": [] } }, { "node": { "recordData": "0x00c7ecc4187f239e09d4cfea5abe6d3c18f923bc", "tags": [] } }, { "node": { "recordData": "0x021021ccee934b346160342f8d7f59f514c08c56", "tags": [] } }, { "node": { "recordData": "0x025376e7e7f161a198fb5fc90a220a553836d11a", "tags": [] } }, { "node": { "recordData": "0x027fc636db3ced7342581baed6eee79f7d1123c3", "tags": [] } }, { "node": { "recordData": "0x02c5b7c40daaaf3aac3dd2ff39013cdd0f1fb4ae", "tags": [] } }, { "node": { "recordData": "0x0331969e189d63fbc31d771bb04ab44227d748d8", "tags": [] } }, { "node": { "recordData": "0x035ebd096afa6b98372494c7f08f3402324117d3", "tags": [] } }, { "node": { "recordData": "0x041d311ac26e478ea6e1753ec354676c452db9d8", "tags": [] } }, { "node": { "recordData": "0x0446bc2beabb16aa542cd99eaff3e63af37125b4", "tags": [] } }, { "node": { "recordData": "0x049569adb8a1e8a9349e9f1111c7b7993a4612eb", "tags": [] } }, { "node": { "recordData": "0x054becf10c79afa4e60f75b187837be9fb83867d", "tags": [] } }, { "node": { "recordData": "0x05977b2fb9b7ab3f3733b34350044a01a388579c", "tags": [] } }, { "node": { "recordData": "0x05a1ff0a32bc24265bcb39499d0c5d9a6cb2011c", "tags": [] } }, { "node": { "recordData": "0x06ce84f051ce93c2fe99344bc8c9d2bf92e64409", "tags": [] } }, { "node": { "recordData": "0x074470b9a32f68de86fac393a10d5cea01c54269", "tags": [] } }, { "node": { "recordData": "0x0865c5de7fe349aa5b7f6ef721f8c2b9cfe5e40d", "tags": [] } }, { "node": { "recordData": "0x092ad3842dced68b5b6ef9cc602be66924baecdd", "tags": [] } }, { "node": { "recordData": "0x09a78e1abe7a893c43986dbf7864c79d03860bde", "tags": [] } }, { "node": { "recordData": "0x0c077910e1dc0b5bea1054cce14143e0971f95ce", "tags": [] } }, { "node": { "recordData": "0x0d1f2c041b7f9702903b89057c1f57f1f01a79af", "tags": [] } }, { "node": { "recordData": "0x0d3f5a7a1ee78e743e25c18e66942fcbcd84ccad", "tags": [] } }, { "node": { "recordData": "0x0de5a5d50453e702ad66d3fcf7c986f408019ffd", "tags": [] } } ] } } } }}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 EfpList($tokenId: TokenId!) { efp { list(by: { tokenId: $tokenId }) { tokenId owner user manager storageLocation { chainId address slot } records(first: 25) { totalCount edges { node { recordData tags } } } } } }", "variables": {"tokenId":"1"}}'{ "data": { "efp": { "list": { "tokenId": "1", "owner": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "user": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "manager": "0xc983ebc9db969782d994627bdffec0ae6efee1b3", "storageLocation": { "chainId": 8453, "address": "0x41aa48ef3c0446b46a5b1cc6337ff3d3716e2a33", "slot": "0x5659892f4e1f565ebd9f7504a28177ca927325e4104d0c6787c7e8a00dcda60c" }, "records": { "totalCount": 452, "edges": [ { "node": { "recordData": "0x0000ce08fa224696a819877070bf378e8b131acf", "tags": [] } }, { "node": { "recordData": "0x000f16ca1e73a0b6b10e1ed4cc5f8232336c1482", "tags": [] } }, { "node": { "recordData": "0x009ae2d1a7240cfc89095fab06ed24f1641d9169", "tags": [] } }, { "node": { "recordData": "0x00c7ecc4187f239e09d4cfea5abe6d3c18f923bc", "tags": [] } }, { "node": { "recordData": "0x021021ccee934b346160342f8d7f59f514c08c56", "tags": [] } }, { "node": { "recordData": "0x025376e7e7f161a198fb5fc90a220a553836d11a", "tags": [] } }, { "node": { "recordData": "0x027fc636db3ced7342581baed6eee79f7d1123c3", "tags": [] } }, { "node": { "recordData": "0x02c5b7c40daaaf3aac3dd2ff39013cdd0f1fb4ae", "tags": [] } }, { "node": { "recordData": "0x0331969e189d63fbc31d771bb04ab44227d748d8", "tags": [] } }, { "node": { "recordData": "0x035ebd096afa6b98372494c7f08f3402324117d3", "tags": [] } }, { "node": { "recordData": "0x041d311ac26e478ea6e1753ec354676c452db9d8", "tags": [] } }, { "node": { "recordData": "0x0446bc2beabb16aa542cd99eaff3e63af37125b4", "tags": [] } }, { "node": { "recordData": "0x049569adb8a1e8a9349e9f1111c7b7993a4612eb", "tags": [] } }, { "node": { "recordData": "0x054becf10c79afa4e60f75b187837be9fb83867d", "tags": [] } }, { "node": { "recordData": "0x05977b2fb9b7ab3f3733b34350044a01a388579c", "tags": [] } }, { "node": { "recordData": "0x05a1ff0a32bc24265bcb39499d0c5d9a6cb2011c", "tags": [] } }, { "node": { "recordData": "0x06ce84f051ce93c2fe99344bc8c9d2bf92e64409", "tags": [] } }, { "node": { "recordData": "0x074470b9a32f68de86fac393a10d5cea01c54269", "tags": [] } }, { "node": { "recordData": "0x0865c5de7fe349aa5b7f6ef721f8c2b9cfe5e40d", "tags": [] } }, { "node": { "recordData": "0x092ad3842dced68b5b6ef9cc602be66924baecdd", "tags": [] } }, { "node": { "recordData": "0x09a78e1abe7a893c43986dbf7864c79d03860bde", "tags": [] } }, { "node": { "recordData": "0x0c077910e1dc0b5bea1054cce14143e0971f95ce", "tags": [] } }, { "node": { "recordData": "0x0d1f2c041b7f9702903b89057c1f57f1f01a79af", "tags": [] } }, { "node": { "recordData": "0x0d3f5a7a1ee78e743e25c18e66942fcbcd84ccad", "tags": [] } }, { "node": { "recordData": "0x0de5a5d50453e702ad66d3fcf7c986f408019ffd", "tags": [] } } ] } } } }}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