Skip to content

Commit

Permalink
📚 Add new indexer documents for Lens v3: v2 (#indexer-codegen)
Browse files Browse the repository at this point in the history
Summary: Added new GraphQL mutation and query documents for account and post operations.

Highlights:

• Introduced mutations like `Challenge`, `Refresh`, `Follow`, `Mute`, `Unfollow`, `Unmute`, `AddReaction`, `BookmarkPost`, `HideReply`, and `UndoReaction`.
• Added `AccountsAvailable` query to check available accounts.
• Each mutation handles specific request and response types.

Read more: https://pierre.co/hey/hey/indexer-codegen
  • Loading branch information
Yoginth authored and Pierre committed Nov 26, 2024
1 parent 38297f9 commit ae45b9a
Show file tree
Hide file tree
Showing 12 changed files with 417 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/indexer/documents/mutations/Challenge.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mutation Challenge($request: ChallengeRequest!) {
challenge(request: $request) {
id
text
}
}
12 changes: 12 additions & 0 deletions packages/indexer/documents/mutations/Refresh.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mutation Refresh($request: RefreshRequest!) {
refresh(request: $request) {
... on AuthenticationTokens {
accessToken
refreshToken
idToken
}
... on ForbiddenError {
reason
}
}
}
16 changes: 16 additions & 0 deletions packages/indexer/documents/mutations/account/Follow.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# mutation Follow($request: CreateFollowRequest!) {
# follow(request: $request) {
# ... on FollowResponse {
# hash
# }
# ... on SelfFundedTransactionRequest {
# reason
# }
# ... on SponsoredTransactionRequest {
# reason
# }
# ... on TransactionWillFail {
# reason
# }
# }
# }
3 changes: 3 additions & 0 deletions packages/indexer/documents/mutations/account/Mute.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation Mute($request: MuteRequest!) {
mute(request: $request)
}
16 changes: 16 additions & 0 deletions packages/indexer/documents/mutations/account/Unfollow.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# mutation Unfollow($request: CreateUnfollowRequest!) {
# unfollow(request: $request) {
# ... on UnfollowResponse {
# hash
# }
# ... on SelfFundedTransactionRequest {
# reason
# }
# ... on SponsoredTransactionRequest {
# reason
# }
# ... on TransactionWillFail {
# reason
# }
# }
# }
3 changes: 3 additions & 0 deletions packages/indexer/documents/mutations/account/Unmute.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation Unmute($request: MuteRequest!) {
unmute(request: $request)
}
10 changes: 10 additions & 0 deletions packages/indexer/documents/mutations/post/AddReaction.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mutation AddReaction($request: AddReactionRequest!) {
addReaction(request: $request) {
... on AddReactionResponse {
success
}
... on AddReactionFailure {
reason
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation BookmarkPost($request: BookmarkPostRequest!) {
bookmarkPost(request: $request)
}
3 changes: 3 additions & 0 deletions packages/indexer/documents/mutations/post/HideReply.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation HideReply($request: HideReplyRequest!) {
hideReply(request: $request)
}
10 changes: 10 additions & 0 deletions packages/indexer/documents/mutations/post/UndoReaction.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mutation UndoReaction($request: UndoReactionRequest!) {
undoReaction(request: $request) {
... on UndoReactionResponse {
success
}
... on UndoReactionFailure {
reason
}
}
}
16 changes: 16 additions & 0 deletions packages/indexer/documents/queries/AccountsAvailable.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
query AccountsAvailable($request: AccountsAvailableRequest!) {
accountsAvailable(request: $request) {
items {
... on AccountManaged {
account {
...AccountFields
}
}
... on AccountOwned {
account {
...AccountFields
}
}
}
}
}
319 changes: 319 additions & 0 deletions packages/indexer/generated.ts

Large diffs are not rendered by default.

1 comment on commit ae45b9a

@vercel
Copy link

@vercel vercel bot commented on ae45b9a 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
heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
hey.xyz

Please sign in to comment.