Lens. Protocol. The Social Layer for Web3. It is a decentralized, open-source protocol that creates a new paradigm for network effects. The social layer is the future of social media.
Links:
Links:
-
Install the Squid CLI:
npm i -g @subsquid/cli
-
Build and run the squid
sqd build sqd up sqd migration:generate sqd process
The indexing will start.
In a separate window, start the GraphQL API server at
localhost:4350/graphql
:sqd serve
For more details on how to build and deploy a squid, see the docs.
Last 10 publications
query {
publications(limit: 10, orderBy: ref_timestamp_DESC) {
ref {
variant
timestamp
creator {
handle
}
}
... on Post {
id
contentUri
}
... on Mirror {
id
mirroredCreator {
handle
}
mirroredPublication {
id
variant
}
}
... on Comment {
id
commentedCreator {
handle
}
commentedPublication {
id
variant
}
contentUri
}
}
}
All Profile Transfers for user with ID 1862
query {
profileTransfers(where: {profile: {id_eq: "1862"}}, limit: 10) {
id
profile {
address
}
from
to
txHash
timestamp
}
}
All Profile Image updates for use with ID 1862
query {
profileImageUpdates(limit: 10, where: {profile: {id_eq: "1862"}}) {
id
oldImageUri
newImageUri
txHash
timestamp
}
}