Building User Activity Feeds
Learn how to create personalized, real-time activity feeds that track user interactions across the Intuition ecosystem using the GraphQL API.
Understanding the Progression
- Get the whole user activity feed, including atoms made and positions taken, along with vault details.
- Get recent claims produced by the user, both atoms (max 10) and triples (max 10) with detailed metadata.
- Get active user positions ordered by share amount - shows current stakes with vault performance metrics.
Query
query GetUserActivity($userAddress: String!, $limit: Int = 20) {
atoms(
where: { creator_id: { _eq: $userAddress } }
order_by: [{ created_at: desc }]
limit: $limit
) {
term_id
label
image
type
created_at
transaction_hash
}
positions(
where: { account_id: { _eq: $userAddress } }
order_by: [{ created_at: desc }]
limit: $limit
) {
id
shares
created_at
vault {
term_id
current_share_price
market_cap
term {
atom {
term_id
label
image
}
}
}
}
}Variables
Click "Run Query" to execute the GraphQL query and see results