-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📚 Add new indexer documents for Lens v3 (#indexer-codegen)
Summary: Added new GraphQL documents for indexing accounts, groups, posts, and timelines. Highlights: • Introduced `GroupFields` and `PostBaseFields` fragments for structured data retrieval. • Created queries `FullAccount`, `Group`, `Groups`, `Timeline`, `WhoActedOnPost`, and `WhoReferencedPost`. • Refactored `PostFields` to utilize `PostBaseFields` for nested post structures. Read more: https://pierre.co/hey/hey/indexer-codegen
- Loading branch information
Yoginth
authored and
Pierre
committed
Nov 26, 2024
1 parent
1d7d79f
commit 38297f9
Showing
12 changed files
with
478 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fragment GroupFields on Group { | ||
address | ||
metadata { | ||
name | ||
slug | ||
description | ||
icon | ||
} | ||
timestamp | ||
} |
24 changes: 24 additions & 0 deletions
24
packages/indexer/documents/fragments/PostBaseFields.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
fragment PostBaseFields on Post { | ||
id | ||
isDeleted | ||
isEdited | ||
stats { | ||
...PostStatsFields | ||
} | ||
author { | ||
...AccountFields | ||
} | ||
metadata { | ||
...PostMetadataFields | ||
} | ||
app { | ||
...AppFields | ||
} | ||
mentions { | ||
replace { | ||
from | ||
to | ||
} | ||
} | ||
timestamp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
fragment PostFields on Post { | ||
id | ||
isDeleted | ||
isEdited | ||
stats { | ||
...PostStatsFields | ||
...PostBaseFields | ||
root { | ||
... on Post { | ||
...PostBaseFields | ||
} | ||
} | ||
author { | ||
...AccountFields | ||
commentOn { | ||
... on Post { | ||
...PostBaseFields | ||
} | ||
} | ||
metadata { | ||
...PostMetadataFields | ||
quoteOf { | ||
... on Post { | ||
...PostBaseFields | ||
} | ||
} | ||
timestamp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
query FullAccount( | ||
$accountRequest: AccountRequest! | ||
$accountStatsRequest: AccountStatsRequest! | ||
) { | ||
account(request: $accountRequest) { | ||
...AccountFields | ||
} | ||
accountStats(request: $accountStatsRequest) { | ||
feedStats { | ||
collects | ||
comments | ||
posts | ||
quotes | ||
reacted | ||
reactions | ||
reposts | ||
} | ||
graphFollowStats { | ||
followers | ||
following | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query Group($request: GroupRequest!) { | ||
group(request: $request) { | ||
...GroupFields | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query GroupMembers($request: GroupMembersRequest!) { | ||
groupMembers(request: $request) { | ||
items { | ||
...AccountFields | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query Groups($request: GroupsRequest!) { | ||
groups(request: $request) { | ||
items { | ||
...GroupFields | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
query Timeline($request: TimelineRequest!) { | ||
timeline(request: $request) { | ||
items { | ||
id | ||
primary { | ||
...PostFields | ||
} | ||
comments { | ||
...PostFields | ||
} | ||
reposts { | ||
...PostFields | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query WhoActedOnPost($request: WhoActedOnPostRequest!) { | ||
whoActedOnPost(request: $request) { | ||
items { | ||
...AccountFields | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query WhoReferencedPost($request: WhoReferencedPostRequest!) { | ||
whoReferencedPost(request: $request) { | ||
items { | ||
...AccountFields | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
38297f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./
web-heyxyz.vercel.app
heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
hey.xyz