{"id":13767300,"url":"https://github.com/protofire/lens-protocol-subgraph","last_synced_at":"2025-07-03T02:07:30.197Z","repository":{"id":38186851,"uuid":"495429158","full_name":"protofire/lens-protocol-subgraph","owner":"protofire","description":"Subgraph for lens protocol","archived":false,"fork":false,"pushed_at":"2022-06-09T20:05:26.000Z","size":85,"stargazers_count":42,"open_issues_count":1,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-10T22:32:13.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protofire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-23T13:45:27.000Z","updated_at":"2025-01-24T01:18:11.000Z","dependencies_parsed_at":"2022-08-08T23:17:02.788Z","dependency_job_id":null,"html_url":"https://github.com/protofire/lens-protocol-subgraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/protofire/lens-protocol-subgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Flens-protocol-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Flens-protocol-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Flens-protocol-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Flens-protocol-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protofire","download_url":"https://codeload.github.com/protofire/lens-protocol-subgraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protofire%2Flens-protocol-subgraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263245316,"owners_count":23436515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:01:07.209Z","updated_at":"2025-07-03T02:07:30.157Z","avatar_url":"https://github.com/protofire.png","language":"TypeScript","funding_links":[],"categories":["Development"],"sub_categories":["Libraries \u0026 Tools"],"readme":"# Subgraph for Lens Protocols\n\n-In process-\n\n**How to deploy**\n\n1. Clone the repository\n2. Add a Subgraph in https://thegraph.com/hosted-service/\n3. `yarn install` into the subgraph directory\n4. `graph auth --product hosted-service \u003cACCESS_TOKEN\u003e`\n5. `yarn deploy`\n\n**Link to the hosted service subgraph :**\nhttps://thegraph.com/hosted-service/subgraph/rtomas/lens-subgraph\n(there are some saved queries to play with the subgraph)\n\n---\n\n**Contract from the collection :**\nhttps://polygonscan.com/address/0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d\n\n**Official Website :**\nhttps://lens.xyz/\n\n**Developer Docs**\nhttps://docs.lens.xyz/docs\n\n```mermaid\nclassDiagram\nclass Stat {\n\tID! id\n\tBigInt! totalProfiles\n\tBigInt! totalAccounts\n\tBigInt! totalPosts\n\tBigInt! totalComments\n\tBigInt! totalMirror\n\tBigInt! totalPublications\n\tBigInt lastCommentCreatedAt\n\tBigInt lastPostCreatedAt\n\tBigInt lastMirrorCreatedAt\n\tBigInt lastProfileCreated\n}\nclass Profile {\n\tID! id\n\tBigInt! profileId\n\tCreator! creator\n\tAccount! owner\n\tBytes followNFT\n\tString followNFTURI\n\tString handle\n\tString imageURI\n\tBigInt createdAt\n\tBytes followModule\n\tBytes followModuleReturnData\n\tBytes dispatcher\n\tBigInt! lastUpdated\n\tBigInt! totalMirrors\n\tBigInt! totalPosts\n\tBigInt! totalComments\n\tBigInt! totalFollowers\n\tBigInt! totalFollowings\n\t[Account!]! followers\n\t[Profile!]! followings\n\t[Comment!] comments\n\t[Post!] posts\n\t[Mirror!] mirrors\n}\nclass Account {\n\tID! id\n\tBytes! address\n\tProfile defaultProfile\n\t[String!]! profilesIds\n\t[Profile!] profiles\n\t[Profile!]! following\n\tBigInt! totalFollowings\n}\nclass Creator {\n\tID! id\n\tBytes! address\n\tBoolean! isWhitelisted\n\tBigInt! lastUpdated\n}\nclass Publication {\n\t\u003c\u003cinterface\u003e\u003e\n\tID! id\n\tProfile! fromProfile\n\tBigInt! pubId\n\tBytes! referenceModule\n\tBytes referenceModuleReturnData\n\tBigInt! timestamp\n}\nclass Post {\n\tID! id\n\tProfile! fromProfile\n\tBigInt! pubId\n\tBytes! referenceModule\n\tBytes referenceModuleReturnData\n\tString! contentURI\n\tBytes! collectModule\n\tBytes collectModuleReturnData\n\tBigInt! timestamp\n}\nclass Mirror {\n\tID! id\n\tProfile! fromProfile\n\tBigInt! pubId\n\tBytes! referenceModule\n\tBytes referenceModuleReturnData\n\tBigInt! profileIdPointed\n\tBigInt! pubIdPointed\n\tBigInt! timestamp\n}\nclass Comment {\n\tID! id\n\tProfile! fromProfile\n\tBigInt! pubId\n\tBytes! referenceModule\n\tBytes referenceModuleReturnData\n\tString! contentURI\n\tBigInt! profileIdPointed\n\tBigInt! pubIdPointed\n\tBytes collectModule\n\tBytes collectModuleReturnData\n\tBigInt! timestamp\n}\nclass Follow {\n\tID! id\n\tAccount fromAccount\n\tString fromProfileSTR\n\t[Profile!] toProfile\n\tBigInt! timestamp\n}\nclass FollowNFTTransferred {\n\tID! id\n\tBigInt profileId\n\tBigInt followNFTID\n\tBytes from\n\tBytes to\n\tBigInt timestamp\n\tString data\n}\nProfile --o Creator : creator\nProfile --o Account : owner\nProfile --o Account : followers\nProfile --o Profile : followings\nProfile --o Comment : comments\nProfile --o Post : posts\nProfile --o Mirror : mirrors\nAccount --o Profile : defaultProfile\nAccount --o Profile : profiles\nAccount --o Profile : following\nPublication --o Profile : fromProfile\nPost --o Profile : fromProfile\nPublication \u003c|-- Post\nMirror --o Profile : fromProfile\nPublication \u003c|-- Mirror\nComment --o Profile : fromProfile\nPublication \u003c|-- Comment\nFollow --o Account : fromAccount\nFollow --o Profile : toProfile\n\n\n```\n\nmermaid class diagram autogenerated with https://github.com/rtomas/mmd-GraphSchema\n\nKeep working in the following:\n\n- Investigate Modules\n- Change entities to be identical to https://docs.lens.xyz/docs/primer so that consumer don't have to rewrite the graphql queries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotofire%2Flens-protocol-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotofire%2Flens-protocol-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotofire%2Flens-protocol-subgraph/lists"}