# Profile query updates
1. **Rename** `GET_ENTITY_GRAPH_BY_ID` to `GET_ENTITY_DETAILS_BY_ID`
- We aren't really collecting their graph, we're just collecting attributes for their profile.
2. **Revise query to include Snapshot ID for profile image**
```
export const GET_ENTITY_DETAILS_BY_ID = `
match
(n:Entity)
where
tostring(id(n)) = $ID
with
n
match
(n:Entity)
optional match
(n)-[a:ALIAS]->(alias:Alias)
optional match
(n)-[t:HAS_ACCOUNT]->(twitter:Twitter)
optional match
(n)-[strategy:HAS_STRATEGY]->(token:Token)
optional match
(n)<-[references:REFERENCES]-(b:Block)-[:HAS_TAG|REFERENCES]-(tag:Tag)
optional match
(n)<-[:DESCRIBES]-(b:Block)
optional match
(n)-[:TRUST]-(trusted:Entity)
with
n,
alias,
twitter,
token,
collect(distinct(tag.tag)) as tags,
n.profileUrl as profileImage,
n.snapshotId as snapshotId,
tostring(id(n)) as id,
b.text as description,
count(distinct(trusted)) as trusted_ents
return
{
id: id,
name: n.name,
twitter_url: twitter,
token_link: 'https://etherscan.io/token/' + token.address,
tags: tags,
snapshot_link: 'https://snapshot.org/#/' + snapshotId,
description: description,
trusted_ents_count: trusted_ents
profileImage: profileImage
}
```
export const GET_PERSON_DETAILS_BY_ID = `
```
match
(n:Person)
where
tostring(id(n)) = $ID
with
n
match
(n:Person)
optional match
(n)-[a:ALIAS]->(alias:Alias)
optional match
(n)-[t:HAS_ACCOUNT]->(twitter:Twitter)
optional match
(n)<-[references:REFERENCES]-(b:Block)-[:HAS_TAG|REFERENCES]-(tag:Tag)
optional match
(n)<-[:DESCRIBES]-(b:Block)
optional match
(n)-[:TRUST]-(trusted)
optional match
(n)-[]-(w:Wallet)
with
n,
alias,
twitter,
collect(distinct(tag.tag)) as tags,
tostring(id(n)) as id
count(distinct(trusted)) as trusted_ents
'https://etherscan.com/address/' + w.address as etherscan_link
return
{
id: id,
name: n.name,
twitter_url: twitter,
tags: tags,
etherscan_link: etherscan_link
trusted_ents_count: trusted_ents
}
```