Skip to content

Commit

Permalink
Refactor GraphQL fragments and queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Nov 26, 2024
1 parent a0cb011 commit 1d7d79f
Show file tree
Hide file tree
Showing 17 changed files with 5,797 additions and 68 deletions.
5 changes: 3 additions & 2 deletions packages/indexer/documents/fragments/AccountFields.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ fragment AccountFields on Account {
address
score
metadata {
appId
attributes {
type
key
Expand All @@ -14,7 +13,9 @@ fragment AccountFields on Account {
name
picture
}
username
username {
...UsernameFields
}
operations {
id
isFollowedByMe
Expand Down
9 changes: 0 additions & 9 deletions packages/indexer/documents/fragments/CurrencyFields.graphql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fragment PostMetadataFields on PostMetadata {
... on LinkMetadata {
...LinkMetadataFields
}
... on LiveStreamMetadata {
...LiveStreamMetadataFields
... on LivestreamMetadata {
...LivestreamMetadataFields
}
... on MintMetadata {
...MintMetadataFields
Expand Down
5 changes: 5 additions & 0 deletions packages/indexer/documents/fragments/UsernameFields.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fragment UsernameFields on Username {
localName
linkedTo
ownedBy
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fragment AudioMetadataFields on AudioMetadata {
attributes {
...MetadataAttributeFields
}
asset {
audio {
...MediaAudioFields
}
attachments {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fragment LiveStreamMetadataFields on LiveStreamMetadata {
fragment LivestreamMetadataFields on LivestreamMetadata {
id
playbackURL
liveURL
playbackUrl
liveUrl
content
tags
attributes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fragment VideoMetadataFields on VideoMetadata {
attributes {
...MetadataAttributeFields
}
asset {
video {
...MediaVideoFields
}
attachments {
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer/documents/queries/AccountManagers.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
query AccountManagers($request: AccountManagersRequest!) {
accountManagers(request: $request) {
items {
address
manager
isLensManager
permissions {
canExecuteTransactions
Expand Down
15 changes: 0 additions & 15 deletions packages/indexer/documents/queries/AccountUsernames.graphql

This file was deleted.

13 changes: 0 additions & 13 deletions packages/indexer/documents/queries/AccountsManaged.graphql

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query AccountAuthentications($request: AccountAuthenticationsRequest!) {
accountAuthentications(request: $request) {
query AuthenticatedSessions($request: AuthenticatedSessionsRequest!) {
authenticatedSessions(request: $request) {
items {
authenticationId
app
Expand Down
10 changes: 0 additions & 10 deletions packages/indexer/documents/queries/Currencies.graphql

This file was deleted.

4 changes: 3 additions & 1 deletion packages/indexer/documents/queries/Followers.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
query Followers($request: FollowersRequest!) {
followers(request: $request) {
items {
...AccountFields
follower {
...AccountFields
}
}
pageInfo {
next
Expand Down
4 changes: 3 additions & 1 deletion packages/indexer/documents/queries/FollowersYouKnow.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
query FollowersYouKnow($request: FollowersYouKnowRequest!) {
followersYouKnow(request: $request) {
items {
...AccountFields
follower {
...AccountFields
}
}
pageInfo {
next
Expand Down
4 changes: 3 additions & 1 deletion packages/indexer/documents/queries/Following.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
query Following($request: FollowingRequest!) {
following(request: $request) {
items {
...AccountFields
following {
...AccountFields
}
}
pageInfo {
next
Expand Down
17 changes: 11 additions & 6 deletions packages/indexer/documents/queries/Me.graphql
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
query Me {
me {
account {
...AccountFields
... on AccountManaged {
account {
...AccountFields
}
}
... on AccountOwned {
account {
...AccountFields
}
}
}
isSignless
isSponsored
loggedInTo
canExecuteTransactions
canTransferTokens
canTransferNative
canSetMetadataUri
appLoggedIn
limit {
window
allowanceLeft
Expand Down
Loading

1 comment on commit 1d7d79f

@vercel
Copy link

@vercel vercel bot commented on 1d7d79f 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 – ./

heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
web-heyxyz.vercel.app
hey.xyz

Please sign in to comment.