Skip to content

Commit

Permalink
πŸ“š Add new indexer documents for Lens v3: v4 (#indexer-codegen)
Browse files Browse the repository at this point in the history
Summary: Added new GraphQL documents for handling notifications, account management, and transaction queries.

Highlights:

β€’ Introduced fragments for various notification types like `CommentNotificationFields` and `FollowNotificationFields`.
β€’ Added mutations for account management, including `AddAccountManager` and `RemoveAccountManager`.
β€’ Implemented queries for notifications and transaction status, such as `Notifications` and `TransactionStatus`.

Read more: https://pierre.co/hey/hey/indexer-codegen
  • Loading branch information
Yoginth authored and Pierre committed Nov 26, 2024
1 parent 1113c34 commit f1e1692
Show file tree
Hide file tree
Showing 39 changed files with 759 additions and 193 deletions.
5 changes: 5 additions & 0 deletions packages/indexer/documents/fragments/RepostFields.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fragment RepostFields on Repost {
repostOf {
...PostFields
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fragment CommentNotificationFields on CommentNotification {
id
comment {
...PostFields
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fragment FollowNotificationFields on FollowNotification {
id
followers {
account {
...AccountFields
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fragment MentionNotificationFields on MentionNotification {
id
post {
...PostFields
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fragment QuoteNotificationFields on QuoteNotification {
id
quote {
...PostFields
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fragment ReactionNotificationFields on ReactionNotification {
id
post {
...PostFields
}
reactions {
account {
...AccountFields
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
fragment RepostNotificationFields on RepostNotification {
id
post {
...PostFields
}
reposts {
account {
...AccountFields
}
repostedAt
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mutation AddAccountManager($request: AddAccountManagerRequest!) {
addAccountManager(request: $request) {
... on SelfFundedTransactionRequest {
selfFundedReason: reason
}
... on SponsoredTransactionRequest {
sponsoredReason: reason
}
... on TransactionWillFail {
transactionFailReason: reason
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mutation RemoveAccountManager($request: RemoveAccountManagerRequest!) {
removeAccountManager(request: $request) {
... on SelfFundedTransactionRequest {
selfFundedReason: reason
}
... on SponsoredTransactionRequest {
sponsoredReason: reason
}
... on TransactionWillFail {
transactionFailReason: reason
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mutation SetAccountMetadata($request: SetAccountMetadataRequest!) {
setAccountMetadata(request: $request) {
... on SetAccountMetadataResponse {
hash
}
... on SponsoredTransactionRequest {
sponsoredReason: reason
}
... on SelfFundedTransactionRequest {
selfFundedReason: reason
}
... on TransactionWillFail {
transactionFailReason: reason
}
}
}
9 changes: 9 additions & 0 deletions packages/indexer/documents/queries/PostReactions.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
query PostReactions($request: PostReactionsRequest!) {
postReactions(request: $request) {
items {
account {
...AccountFields
}
}
}
}
16 changes: 16 additions & 0 deletions packages/indexer/documents/queries/TransactionStatus.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
query TransactionStatus($request: TransactionStatusRequest!) {
transactionStatus(request: $request) {
... on FinishedTransactionStatus {
blockTimestamp
}
... on PendingTransactionStatus {
blockTimestamp
}
... on NotIndexedYetStatus {
reason
}
... on FailedTransactionStatus {
reason
}
}
}
24 changes: 24 additions & 0 deletions packages/indexer/documents/queries/account/Notifications.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
query Notifications($request: NotificationRequest!) {
notifications(request: $request) {
items {
... on CommentNotification {
...CommentNotificationFields
}
... on FollowNotification {
...FollowNotificationFields
}
... on MentionNotification {
...MentionNotificationFields
}
... on QuoteNotification {
...QuoteNotificationFields
}
... on ReactionNotification {
...ReactionNotificationFields
}
... on RepostNotification {
...RepostNotificationFields
}
}
}
}
12 changes: 12 additions & 0 deletions packages/indexer/documents/queries/post/PostBookmarks.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query PostBookmarks($request: PostBookmarksRequest!) {
postBookmarks(request: $request) {
items {
... on Post {
...PostFields
}
... on Repost {
...RepostFields
}
}
}
}
9 changes: 9 additions & 0 deletions packages/indexer/documents/queries/post/PostReactions.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
query PostReactions($request: PostReactionsRequest!) {
postReactions(request: $request) {
items {
account {
...AccountFields
}
}
}
}
12 changes: 12 additions & 0 deletions packages/indexer/documents/queries/post/PostReferences.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query PostReferences($request: PostReferencesRequest!) {
postReferences(request: $request) {
items {
... on Post {
...PostFields
}
... on Repost {
...RepostFields
}
}
}
}
Loading

1 comment on commit f1e1692

@vercel
Copy link

@vercel vercel bot commented on f1e1692 Nov 26, 2024

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
web-git-main-heyxyz.vercel.app
heyxyz.vercel.app
hey.xyz

Please sign in to comment.