Teal.fm frontend powered by slices.network tealfm-slices.wisp.place
tealfm slices

Compare changes

Choose any two refs to compare.

+4 -4
README.md
···
2. **Fetch the GraphQL schema**
```bash
-
npm run schema
+
npm run schema:prod
```
3. **Generate Relay types**
···
The project connects to the Slices API. To update the schema:
```bash
-
npm run schema
+
npm run schema:prod
npx relay-compiler
```
···
- **Production API**: `https://api.slices.network/graphql`
- **Slice**:
-
`at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a`
+
`at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26`
## Scripts
···
- `npm run build` - Build for production
- `npm run preview` - Preview production build
- `npm run lint` - Run ESLint
-
- `npm run schema` - Fetch GraphQL schema from production API
+
- `npm run schema:prod` - Fetch GraphQL schema from production API
## Features in Detail
+1
_redirects
···
+
/* /index.html 200
+3 -3
package.json
···
"type": "module",
"scripts": {
"dev": "vite",
-
"build": "tsc -b && vite build",
+
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
-
"schema:dev": "npx get-graphql-schema 'http://localhost:3000/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a' > schema.graphql",
-
"schema:prod": "npx get-graphql-schema 'https://api.slices.network/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a' > schema.graphql"
+
"schema:dev": "npx get-graphql-schema 'http://localhost:3000/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26' > schema.graphql",
+
"schema:prod": "npx get-graphql-schema 'https://api.slices.network/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26' > schema.graphql"
},
"dependencies": {
"graphql-ws": "^6.0.6",
+449 -33
schema.graphql
···
}
type AppBskyActorProfile {
+
id: ID!
uri: String!
cid: String!
did: String!
···
joinedViaStarterPack: JSON
labels: JSON
pinnedPost: JSON
-
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
appBskyFeedThreadgates(limit: Int): [AppBskyFeedThreadgate!]!
···
interval: DateInterval
}
+
input AppBskyActorProfileInput {
+
avatar: JSON
+
banner: JSON
+
createdAt: String
+
description: String
+
displayName: String
+
joinedViaStarterPack: JSON
+
labels: JSON
+
pinnedPost: JSON
+
}
+
input AppBskyActorProfileSortFieldInput {
field: AppBskyActorProfileGroupByField!
direction: SortDirection
···
joinedViaStarterPack: StringFilter
labels: StringFilter
pinnedPost: StringFilter
+
json: StringFilter
+
and: [AppBskyActorProfileWhereInput]
+
or: [AppBskyActorProfileWhereInput]
+
}
+
+
type AppBskyEmbedDefsAspectRatio {
+
height: Int
+
width: Int
}
type AppBskyEmbedExternal {
+
id: ID!
uri: String!
cid: String!
did: String!
indexedAt: String!
actorHandle: String
-
external: JSON!
+
external: AppBskyEmbedExternalExternal!
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
···
type AppBskyEmbedExternalEdge {
node: AppBskyEmbedExternal!
cursor: String!
+
}
+
+
type AppBskyEmbedExternalExternal {
+
description: String
+
thumb: Blob
+
title: String
+
uri: String
}
enum AppBskyEmbedExternalGroupByField {
···
interval: DateInterval
}
+
input AppBskyEmbedExternalInput {
+
external: JSON!
+
}
+
input AppBskyEmbedExternalSortFieldInput {
field: AppBskyEmbedExternalGroupByField!
direction: SortDirection
···
collection: StringFilter
actorHandle: StringFilter
external: StringFilter
+
json: StringFilter
+
and: [AppBskyEmbedExternalWhereInput]
+
or: [AppBskyEmbedExternalWhereInput]
}
type AppBskyEmbedImages {
+
id: ID!
uri: String!
cid: String!
did: String!
indexedAt: String!
actorHandle: String
-
images: JSON!
+
images: [AppBskyEmbedImagesImage!]
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
···
interval: DateInterval
}
+
type AppBskyEmbedImagesImage {
+
alt: String
+
aspectRatio: JSON
+
image: Blob
+
}
+
+
input AppBskyEmbedImagesInput {
+
images: JSON!
+
}
+
input AppBskyEmbedImagesSortFieldInput {
field: AppBskyEmbedImagesGroupByField!
direction: SortDirection
···
collection: StringFilter
actorHandle: StringFilter
images: StringFilter
+
json: StringFilter
+
and: [AppBskyEmbedImagesWhereInput]
+
or: [AppBskyEmbedImagesWhereInput]
}
type AppBskyEmbedRecord {
-
uri: String!
-
cid: String!
-
did: String!
-
indexedAt: String!
-
actorHandle: String
-
record: JSON!
-
appBskyActorProfile: AppBskyActorProfile
-
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
-
appBskyFeedPostgatesCount: Int!
-
appBskyFeedThreadgates(limit: Int): [AppBskyFeedThreadgate!]!
-
appBskyFeedThreadgatesCount: Int!
-
appBskyActorProfiles(limit: Int): [AppBskyActorProfile!]!
-
appBskyActorProfilesCount: Int!
-
fmTealAlphaFeedPlays(limit: Int): [FmTealAlphaFeedPlay!]!
-
fmTealAlphaFeedPlaysCount: Int!
+
record: JSON
}
type AppBskyEmbedRecordAggregated {
···
interval: DateInterval
}
+
input AppBskyEmbedRecordInput {
+
record: JSON!
+
}
+
input AppBskyEmbedRecordSortFieldInput {
field: AppBskyEmbedRecordGroupByField!
direction: SortDirection
···
collection: StringFilter
actorHandle: StringFilter
record: StringFilter
+
json: StringFilter
+
and: [AppBskyEmbedRecordWhereInput]
+
or: [AppBskyEmbedRecordWhereInput]
}
type AppBskyEmbedRecordWithMedia {
+
id: ID!
uri: String!
cid: String!
did: String!
indexedAt: String!
actorHandle: String
media: JSON!
-
record: JSON!
+
record: AppBskyEmbedRecord!
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
···
interval: DateInterval
}
+
input AppBskyEmbedRecordWithMediaInput {
+
media: JSON!
+
record: JSON!
+
}
+
input AppBskyEmbedRecordWithMediaSortFieldInput {
field: AppBskyEmbedRecordWithMediaGroupByField!
direction: SortDirection
···
actorHandle: StringFilter
media: StringFilter
record: StringFilter
+
json: StringFilter
+
and: [AppBskyEmbedRecordWithMediaWhereInput]
+
or: [AppBskyEmbedRecordWithMediaWhereInput]
}
type AppBskyEmbedVideo {
+
id: ID!
uri: String!
cid: String!
did: String!
indexedAt: String!
actorHandle: String
alt: String
-
aspectRatio: JSON
-
captions: JSON
+
aspectRatio: AppBskyEmbedDefsAspectRatio
+
captions: [AppBskyEmbedVideoCaption]
video: Blob
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
···
captions: JSON
video: JSON
count: Int!
+
}
+
+
type AppBskyEmbedVideoCaption {
+
file: Blob
+
lang: String
}
type AppBskyEmbedVideoConnection {
···
interval: DateInterval
}
+
input AppBskyEmbedVideoInput {
+
alt: String
+
aspectRatio: JSON
+
captions: JSON
+
video: JSON!
+
}
+
input AppBskyEmbedVideoSortFieldInput {
field: AppBskyEmbedVideoGroupByField!
direction: SortDirection
···
aspectRatio: StringFilter
captions: StringFilter
video: StringFilter
+
json: StringFilter
+
and: [AppBskyEmbedVideoWhereInput]
+
or: [AppBskyEmbedVideoWhereInput]
}
type AppBskyFeedPostgate {
+
id: ID!
uri: String!
cid: String!
did: String!
···
detachedEmbeddingUris: [String]
embeddingRules: JSON
post: String!
-
appBskyFeedPostgate: AppBskyFeedPostgate
appBskyFeedThreadgate: AppBskyFeedThreadgate
appBskyActorProfile: AppBskyActorProfile
fmTealAlphaFeedPlay: FmTealAlphaFeedPlay
···
interval: DateInterval
}
+
input AppBskyFeedPostgateInput {
+
createdAt: String!
+
detachedEmbeddingUris: [String]
+
embeddingRules: JSON
+
post: String!
+
}
+
input AppBskyFeedPostgateSortFieldInput {
field: AppBskyFeedPostgateGroupByField!
direction: SortDirection
···
detachedEmbeddingUris: StringFilter
embeddingRules: StringFilter
post: StringFilter
+
json: StringFilter
+
and: [AppBskyFeedPostgateWhereInput]
+
or: [AppBskyFeedPostgateWhereInput]
}
type AppBskyFeedThreadgate {
+
id: ID!
uri: String!
cid: String!
did: String!
···
hiddenReplies: [String]
post: String!
appBskyFeedPostgate: AppBskyFeedPostgate
-
appBskyFeedThreadgate: AppBskyFeedThreadgate
appBskyActorProfile: AppBskyActorProfile
fmTealAlphaFeedPlay: FmTealAlphaFeedPlay
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
···
input AppBskyFeedThreadgateGroupByFieldInput {
field: AppBskyFeedThreadgateGroupByField!
interval: DateInterval
+
}
+
+
input AppBskyFeedThreadgateInput {
+
allow: JSON
+
createdAt: String!
+
hiddenReplies: [String]
+
post: String!
}
input AppBskyFeedThreadgateSortFieldInput {
···
createdAt: StringFilter
hiddenReplies: StringFilter
post: StringFilter
+
json: StringFilter
+
and: [AppBskyFeedThreadgateWhereInput]
+
or: [AppBskyFeedThreadgateWhereInput]
}
type AppBskyRichtextFacet {
+
id: ID!
uri: String!
cid: String!
did: String!
indexedAt: String!
actorHandle: String
features: JSON!
-
index: JSON!
+
index: AppBskyRichtextFacetByteSlice!
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
···
count: Int!
}
+
type AppBskyRichtextFacetByteSlice {
+
byteEnd: Int
+
byteStart: Int
+
}
+
type AppBskyRichtextFacetConnection {
totalCount: Int!
pageInfo: PageInfo!
···
interval: DateInterval
}
+
input AppBskyRichtextFacetInput {
+
features: JSON!
+
index: JSON!
+
}
+
input AppBskyRichtextFacetSortFieldInput {
field: AppBskyRichtextFacetGroupByField!
direction: SortDirection
···
actorHandle: StringFilter
features: StringFilter
index: StringFilter
+
json: StringFilter
+
and: [AppBskyRichtextFacetWhereInput]
+
or: [AppBskyRichtextFacetWhereInput]
}
type Blob {
···
url(preset: String): String!
}
+
type BlobUploadResponse {
+
blob: Blob!
+
}
+
+
type CollectionSummary {
+
collection: String!
+
estimatedRepos: Int!
+
isExternal: Boolean!
+
}
+
type ComAtprotoRepoStrongRef {
+
id: ID!
did: String!
indexedAt: String!
actorHandle: String
···
interval: DateInterval
}
+
input ComAtprotoRepoStrongRefInput {
+
cid: String!
+
uri: String!
+
}
+
input ComAtprotoRepoStrongRefSortFieldInput {
field: ComAtprotoRepoStrongRefGroupByField!
direction: SortDirection
···
actorHandle: StringFilter
cid: StringFilter
uri: StringFilter
+
json: StringFilter
+
and: [ComAtprotoRepoStrongRefWhereInput]
+
or: [ComAtprotoRepoStrongRefWhereInput]
}
enum DateInterval {
···
lte: String
}
+
type DeleteSliceRecordsOutput {
+
message: String!
+
recordsDeleted: Int!
+
actorsDeleted: Int!
+
}
+
+
type FmTealAlphaFeedDefsArtist {
+
artistMbId: String
+
artistName: String
+
}
+
type FmTealAlphaFeedPlay {
+
id: ID!
uri: String!
cid: String!
did: String!
···
actorHandle: String
artistMbIds: [String]
artistNames: [String]
-
artists: JSON
+
artists: [FmTealAlphaFeedDefsArtist]
duration: Int
isrc: String
musicServiceBaseDomain: String
···
interval: DateInterval
}
+
input FmTealAlphaFeedPlayInput {
+
artistMbIds: [String]
+
artistNames: [String]
+
artists: JSON
+
duration: Int
+
isrc: String
+
musicServiceBaseDomain: String
+
originUrl: String
+
playedTime: String
+
recordingMbId: String
+
releaseMbId: String
+
releaseName: String
+
submissionClientAgent: String
+
trackMbId: String
+
trackName: String!
+
}
+
input FmTealAlphaFeedPlaySortFieldInput {
field: FmTealAlphaFeedPlayGroupByField!
direction: SortDirection
···
submissionClientAgent: StringFilter
trackMbId: StringFilter
trackName: StringFilter
+
json: StringFilter
+
and: [FmTealAlphaFeedPlayWhereInput]
+
or: [FmTealAlphaFeedPlayWhereInput]
}
input IntFilter {
···
lte: Int
}
+
type JetstreamLogEntry {
+
id: String!
+
createdAt: String!
+
logType: String!
+
jobId: String
+
userDid: String
+
sliceUri: String
+
level: String!
+
message: String!
+
metadata: JSON
+
}
+
scalar JSON
type Mutation {
"""Sync user collections for a given DID"""
syncUserCollections(did: String!): SyncResult!
+
+
"""Create a new app.bsky.embed.record record"""
+
createAppBskyEmbedRecord(input: AppBskyEmbedRecordInput!, rkey: String): AppBskyEmbedRecord!
+
+
"""Update a app.bsky.embed.record record"""
+
updateAppBskyEmbedRecord(rkey: String!, input: AppBskyEmbedRecordInput!): AppBskyEmbedRecord!
+
+
"""Delete a app.bsky.embed.record record"""
+
deleteAppBskyEmbedRecord(rkey: String!): AppBskyEmbedRecord!
+
+
"""Create a new app.bsky.embed.images record"""
+
createAppBskyEmbedImages(input: AppBskyEmbedImagesInput!, rkey: String): AppBskyEmbedImages!
+
+
"""Update a app.bsky.embed.images record"""
+
updateAppBskyEmbedImages(rkey: String!, input: AppBskyEmbedImagesInput!): AppBskyEmbedImages!
+
+
"""Delete a app.bsky.embed.images record"""
+
deleteAppBskyEmbedImages(rkey: String!): AppBskyEmbedImages!
+
+
"""Create a new app.bsky.embed.recordWithMedia record"""
+
createAppBskyEmbedRecordWithMedia(input: AppBskyEmbedRecordWithMediaInput!, rkey: String): AppBskyEmbedRecordWithMedia!
+
+
"""Update a app.bsky.embed.recordWithMedia record"""
+
updateAppBskyEmbedRecordWithMedia(rkey: String!, input: AppBskyEmbedRecordWithMediaInput!): AppBskyEmbedRecordWithMedia!
+
+
"""Delete a app.bsky.embed.recordWithMedia record"""
+
deleteAppBskyEmbedRecordWithMedia(rkey: String!): AppBskyEmbedRecordWithMedia!
+
+
"""Create a new app.bsky.embed.video record"""
+
createAppBskyEmbedVideo(input: AppBskyEmbedVideoInput!, rkey: String): AppBskyEmbedVideo!
+
+
"""Update a app.bsky.embed.video record"""
+
updateAppBskyEmbedVideo(rkey: String!, input: AppBskyEmbedVideoInput!): AppBskyEmbedVideo!
+
+
"""Delete a app.bsky.embed.video record"""
+
deleteAppBskyEmbedVideo(rkey: String!): AppBskyEmbedVideo!
+
+
"""Create a new app.bsky.embed.external record"""
+
createAppBskyEmbedExternal(input: AppBskyEmbedExternalInput!, rkey: String): AppBskyEmbedExternal!
+
+
"""Update a app.bsky.embed.external record"""
+
updateAppBskyEmbedExternal(rkey: String!, input: AppBskyEmbedExternalInput!): AppBskyEmbedExternal!
+
+
"""Delete a app.bsky.embed.external record"""
+
deleteAppBskyEmbedExternal(rkey: String!): AppBskyEmbedExternal!
+
+
"""Create a new app.bsky.feed.postgate record"""
+
createAppBskyFeedPostgate(input: AppBskyFeedPostgateInput!, rkey: String): AppBskyFeedPostgate!
+
+
"""Update a app.bsky.feed.postgate record"""
+
updateAppBskyFeedPostgate(rkey: String!, input: AppBskyFeedPostgateInput!): AppBskyFeedPostgate!
+
+
"""Delete a app.bsky.feed.postgate record"""
+
deleteAppBskyFeedPostgate(rkey: String!): AppBskyFeedPostgate!
+
+
"""Create a new app.bsky.feed.threadgate record"""
+
createAppBskyFeedThreadgate(input: AppBskyFeedThreadgateInput!, rkey: String): AppBskyFeedThreadgate!
+
+
"""Update a app.bsky.feed.threadgate record"""
+
updateAppBskyFeedThreadgate(rkey: String!, input: AppBskyFeedThreadgateInput!): AppBskyFeedThreadgate!
+
+
"""Delete a app.bsky.feed.threadgate record"""
+
deleteAppBskyFeedThreadgate(rkey: String!): AppBskyFeedThreadgate!
+
+
"""Create a new app.bsky.richtext.facet record"""
+
createAppBskyRichtextFacet(input: AppBskyRichtextFacetInput!, rkey: String): AppBskyRichtextFacet!
+
+
"""Update a app.bsky.richtext.facet record"""
+
updateAppBskyRichtextFacet(rkey: String!, input: AppBskyRichtextFacetInput!): AppBskyRichtextFacet!
+
+
"""Delete a app.bsky.richtext.facet record"""
+
deleteAppBskyRichtextFacet(rkey: String!): AppBskyRichtextFacet!
+
+
"""Create a new app.bsky.actor.profile record"""
+
createAppBskyActorProfile(input: AppBskyActorProfileInput!, rkey: String): AppBskyActorProfile!
+
+
"""Update a app.bsky.actor.profile record"""
+
updateAppBskyActorProfile(rkey: String!, input: AppBskyActorProfileInput!): AppBskyActorProfile!
+
+
"""Delete a app.bsky.actor.profile record"""
+
deleteAppBskyActorProfile(rkey: String!): AppBskyActorProfile!
+
+
"""Create a new com.atproto.repo.strongRef record"""
+
createComAtprotoRepoStrongRef(input: ComAtprotoRepoStrongRefInput!, rkey: String): ComAtprotoRepoStrongRef!
+
+
"""Update a com.atproto.repo.strongRef record"""
+
updateComAtprotoRepoStrongRef(rkey: String!, input: ComAtprotoRepoStrongRefInput!): ComAtprotoRepoStrongRef!
+
+
"""Delete a com.atproto.repo.strongRef record"""
+
deleteComAtprotoRepoStrongRef(rkey: String!): ComAtprotoRepoStrongRef!
+
+
"""Create a new fm.teal.alpha.feed.play record"""
+
createFmTealAlphaFeedPlay(input: FmTealAlphaFeedPlayInput!, rkey: String): FmTealAlphaFeedPlay!
+
+
"""Update a fm.teal.alpha.feed.play record"""
+
updateFmTealAlphaFeedPlay(rkey: String!, input: FmTealAlphaFeedPlayInput!): FmTealAlphaFeedPlay!
+
+
"""Delete a fm.teal.alpha.feed.play record"""
+
deleteFmTealAlphaFeedPlay(rkey: String!): FmTealAlphaFeedPlay!
+
+
"""Start a sync job to backfill collections from the ATProto relay"""
+
startSync(slice: String, collections: [String], externalCollections: [String], repos: [String], limitPerRepo: Int, skipValidation: Boolean, maxRepos: Int): StartSyncOutput!
+
+
"""Cancel a pending or running sync job"""
+
cancelJob(jobId: String!): Boolean!
+
+
"""Delete a sync job from the database"""
+
deleteJob(id: ID!): ID
+
+
"""Upload a blob to the user's AT Protocol repository"""
+
uploadBlob(data: String!, mimeType: String!): BlobUploadResponse!
+
+
"""Register a new OAuth client for a slice"""
+
createOAuthClient(sliceUri: String!, clientName: String!, redirectUris: [String!]!, scope: String!, clientUri: String, logoUri: String, tosUri: String, policyUri: String): OAuthClient!
+
+
"""Update an OAuth client"""
+
updateOAuthClient(clientId: String!, clientName: String, redirectUris: [String], scope: String, clientUri: String, logoUri: String, tosUri: String, policyUri: String): OAuthClient!
+
+
"""Delete an OAuth client"""
+
deleteOAuthClient(clientId: String!): Boolean!
+
+
"""
+
Delete all records and actors from a slice index. Requires authentication and slice ownership.
+
"""
+
deleteSliceRecords(slice: String): DeleteSliceRecordsOutput!
+
}
+
+
type OAuthClient {
+
clientId: String!
+
clientSecret: String
+
clientName: String!
+
redirectUris: [String!]!
+
grantTypes: [String!]!
+
responseTypes: [String!]!
+
scope: String
+
clientUri: String
+
logoUri: String
+
tosUri: String
+
policyUri: String
+
createdAt: String!
+
createdByDid: String!
}
type PageInfo {
···
Aggregated query for app.bsky.embed.images records with GROUP BY support
"""
appBskyEmbedImagesesAggregated(groupBy: [AppBskyEmbedImagesGroupByFieldInput!], where: AppBskyEmbedImagesWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedImagesAggregated!]!
+
+
"""Query app.bsky.embed.recordWithMedia records"""
+
appBskyEmbedRecordWithMedias(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedRecordWithMediaSortFieldInput], where: AppBskyEmbedRecordWithMediaWhereInput): AppBskyEmbedRecordWithMediaConnection!
+
+
"""
+
Aggregated query for app.bsky.embed.recordWithMedia records with GROUP BY support
+
"""
+
appBskyEmbedRecordWithMediasAggregated(groupBy: [AppBskyEmbedRecordWithMediaGroupByFieldInput!], where: AppBskyEmbedRecordWithMediaWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordWithMediaAggregated!]!
"""Query app.bsky.embed.video records"""
appBskyEmbedVideos(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedVideoSortFieldInput], where: AppBskyEmbedVideoWhereInput): AppBskyEmbedVideoConnection!
···
"""
appBskyEmbedVideosAggregated(groupBy: [AppBskyEmbedVideoGroupByFieldInput!], where: AppBskyEmbedVideoWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedVideoAggregated!]!
-
"""Query app.bsky.embed.recordWithMedia records"""
-
appBskyEmbedRecordWithMedias(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedRecordWithMediaSortFieldInput], where: AppBskyEmbedRecordWithMediaWhereInput): AppBskyEmbedRecordWithMediaConnection!
-
-
"""
-
Aggregated query for app.bsky.embed.recordWithMedia records with GROUP BY support
-
"""
-
appBskyEmbedRecordWithMediasAggregated(groupBy: [AppBskyEmbedRecordWithMediaGroupByFieldInput!], where: AppBskyEmbedRecordWithMediaWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordWithMediaAggregated!]!
-
"""Query app.bsky.embed.external records"""
appBskyEmbedExternals(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedExternalSortFieldInput], where: AppBskyEmbedExternalWhereInput): AppBskyEmbedExternalConnection!
···
Aggregated query for fm.teal.alpha.feed.play records with GROUP BY support
"""
fmTealAlphaFeedPlaysAggregated(groupBy: [FmTealAlphaFeedPlayGroupByFieldInput!], where: FmTealAlphaFeedPlayWhereInput, orderBy: AggregationOrderBy, limit: Int): [FmTealAlphaFeedPlayAggregated!]!
+
+
"""
+
Get logs from the Jetstream real-time indexing service, optionally filtered by slice
+
"""
+
jetstreamLogs(slice: String, limit: Int): [JetstreamLogEntry!]!
+
+
"""Get status of a specific sync job"""
+
syncJob(jobId: String!): SyncJob
+
+
"""Get sync job history for a slice"""
+
syncJobs(slice: String, limit: Int): [SyncJob!]!
+
+
"""Get logs for a specific sync job"""
+
syncJobLogs(jobId: String!, limit: Int): [JetstreamLogEntry!]!
+
+
"""Get summary of repos that would be synced based on collection filters"""
+
getSyncSummary(slice: String!, collections: [String], externalCollections: [String], repos: [String]): SyncSummary!
+
+
"""
+
Get sparkline data for multiple slices showing record indexing activity over time
+
"""
+
sparklines(slices: [String!]!, interval: String, duration: String): [SliceSparkline!]!
+
+
"""
+
Query records across all collections in a slice with filtering and pagination.
+
Provide either sliceUri or both actorHandle and rkey.
+
"""
+
sliceRecords(sliceUri: String, actorHandle: String, rkey: String, first: Int, after: String, where: SliceRecordsWhereInput): SliceRecordsConnection!
+
+
"""Get all OAuth clients for a slice"""
+
oauthClients(slice: String): [OAuthClient!]!
+
}
+
+
type SliceRecord {
+
uri: String!
+
cid: String!
+
did: String!
+
collection: String!
+
value: String!
+
indexedAt: String!
+
}
+
+
type SliceRecordEdge {
+
node: SliceRecord!
+
cursor: String!
+
}
+
+
type SliceRecordsConnection {
+
totalCount: Int!
+
edges: [SliceRecordEdge!]!
+
pageInfo: PageInfo!
+
}
+
+
input SliceRecordsWhereInput {
+
collection: StringFilter
+
did: StringFilter
+
uri: StringFilter
+
cid: StringFilter
+
indexedAt: DateTimeFilter
+
json: StringFilter
+
or: [SliceRecordsWhereInput]
+
}
+
+
type SliceSparkline {
+
sliceUri: String!
+
points: [SparklinePoint!]!
}
enum SortDirection {
···
desc
}
+
type SparklinePoint {
+
timestamp: String!
+
count: Int!
+
}
+
+
type StartSyncOutput {
+
jobId: String!
+
message: String!
+
}
+
input StringFilter {
eq: String
in: [String]
contains: String
+
fuzzy: String
gt: String
gte: String
lt: String
···
Subscribe to fm.teal.alpha.feed.play record deletion events. Returns the URI of deleted records.
"""
fmTealAlphaFeedPlayDeleted: String!
+
+
"""Subscribe to new Jetstream log entries, optionally filtered by slice"""
+
jetstreamLogsCreated(slice: String): JetstreamLogEntry!
+
+
"""Subscribe to sync job status updates"""
+
syncJobUpdated(jobId: String, slice: String): SyncJob!
+
}
+
+
type SyncJob {
+
id: ID!
+
jobId: String!
+
sliceUri: String!
+
status: String!
+
createdAt: String!
+
startedAt: String
+
completedAt: String
+
result: SyncJobResult
+
error: String
+
retryCount: Int!
+
}
+
+
type SyncJobResult {
+
success: Boolean!
+
totalRecords: Int!
+
collectionsSynced: [String!]!
+
reposProcessed: Int!
+
message: String!
type SyncResult {
···
message: String!
+
type SyncSummary {
+
totalRepos: Int!
+
cappedRepos: Int!
+
wouldBeCapped: Boolean!
+
appliedLimit: Int!
+
collectionsSummary: [CollectionSummary!]!
+
}
+
+12
src/App.tsx
···
const newPlay = store.getRootField("fmTealAlphaFeedPlayCreated");
if (!newPlay) return;
+
// Only add plays from the last 24 hours
+
const playedTime = newPlay.getValue("playedTime") as string | null;
+
if (!playedTime) return;
+
+
const playDate = new Date(playedTime);
+
const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000);
+
+
if (playDate < cutoff) {
+
// Play is too old, don't add it to the feed
+
return;
+
}
+
const root = store.getRoot();
const connection = ConnectionHandler.getConnection(
root,
+61
src/ArtistItem.tsx
···
+
interface Artist {
+
artistName: string;
+
}
+
+
interface ArtistItemProps {
+
artists: string | null | undefined;
+
count: number;
+
rank: number;
+
maxCount: number;
+
}
+
+
export default function ArtistItem({
+
artists,
+
count,
+
rank,
+
maxCount,
+
}: ArtistItemProps) {
+
const barWidth = maxCount > 0 ? (count / maxCount) * 100 : 0;
+
+
// Parse artists JSON
+
let artistNames = "Unknown Artist";
+
if (artists) {
+
try {
+
const parsed = typeof artists === 'string' ? JSON.parse(artists) : artists;
+
if (Array.isArray(parsed)) {
+
artistNames = parsed.map((a: Artist) => a.artistName).join(", ");
+
} else if (typeof parsed === 'string') {
+
artistNames = parsed;
+
}
+
} catch (e) {
+
console.log('Failed to parse artists:', artists, e);
+
artistNames = String(artists);
+
}
+
}
+
+
return (
+
<div className="group py-3 px-4 hover:bg-zinc-900/50 transition-colors relative overflow-hidden">
+
<div
+
className="absolute inset-y-0 left-0 bg-violet-500/10 transition-all"
+
style={{ width: `${barWidth}%` }}
+
/>
+
<div className="flex items-center gap-4 relative">
+
<div className="text-xs text-zinc-600 w-8 text-right flex-shrink-0 font-medium">
+
{rank}
+
</div>
+
+
<div className="flex-1 min-w-0">
+
<h3 className="text-sm font-medium text-zinc-100 truncate">
+
{artistNames}
+
</h3>
+
</div>
+
+
<div className="text-right flex-shrink-0">
+
<p className="text-xs text-zinc-400 font-medium">
+
{count.toLocaleString()}
+
</p>
+
</div>
+
</div>
+
</div>
+
);
+
}
+78
src/Overall.tsx
···
+
import { NavLink, Outlet, useLocation, useParams } from "react-router-dom";
+
import ProfileLayout from "./ProfileLayout";
+
+
const periods = [
+
{ id: "daily", label: "24 hours" },
+
{ id: "weekly", label: "7 days" },
+
{ id: "monthly", label: "30 days" },
+
{ id: "all", label: "All time" },
+
];
+
+
export default function Overall() {
+
const { handle, period = "all" } = useParams<
+
{ handle: string; period?: string }
+
>();
+
const location = useLocation();
+
+
const activeTab = location.pathname.split("/")[4] || "artists";
+
+
return (
+
//@ts-expect-error: idk
+
<ProfileLayout handle={handle!}>
+
<div className="flex items-center justify-between mb-8">
+
<div className="flex items-center border-b border-zinc-800">
+
<NavLink
+
to={`/profile/${handle}/overall/artists/${period}`}
+
className={({ isActive }) =>
+
`px-4 py-2 text-xs uppercase tracking-wider ${
+
isActive
+
? "text-zinc-100 border-b-2 border-zinc-100"
+
: "text-zinc-500 hover:text-zinc-300"
+
}`}
+
>
+
Artists
+
</NavLink>
+
<NavLink
+
to={`/profile/${handle}/overall/albums/${period}`}
+
className={({ isActive }) =>
+
`px-4 py-2 text-xs uppercase tracking-wider ${
+
isActive
+
? "text-zinc-100 border-b-2 border-zinc-100"
+
: "text-zinc-500 hover:text-zinc-300"
+
}`}
+
>
+
Albums
+
</NavLink>
+
<NavLink
+
to={`/profile/${handle}/overall/tracks/${period}`}
+
className={({ isActive }) =>
+
`px-4 py-2 text-xs uppercase tracking-wider ${
+
isActive
+
? "text-zinc-100 border-b-2 border-zinc-100"
+
: "text-zinc-500 hover:text-zinc-300"
+
}`}
+
>
+
Tracks
+
</NavLink>
+
</div>
+
<div className="flex items-center gap-2">
+
{periods.map((p) => (
+
<NavLink
+
key={p.id}
+
to={`/profile/${handle}/overall/${activeTab}/${p.id}`}
+
className={() =>
+
`px-3 py-1 text-xs rounded-md ${
+
period === p.id
+
? "bg-zinc-800 text-zinc-100"
+
: "text-zinc-500 hover:bg-zinc-800/50"
+
}`}
+
>
+
{p.label}
+
</NavLink>
+
))}
+
</div>
+
</div>
+
<Outlet />
+
</ProfileLayout>
+
);
+
}
+41 -83
src/Profile.tsx
···
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
-
import { useParams, Link } from "react-router-dom";
-
import { useEffect, useRef, useMemo } from "react";
+
import { useParams } from "react-router-dom";
+
import { useEffect, useMemo, useRef } from "react";
import type { ProfileQuery as ProfileQueryType } from "./__generated__/ProfileQuery.graphql";
import type { Profile_plays$key } from "./__generated__/Profile_plays.graphql";
import TrackItem from "./TrackItem";
-
import ScrobbleChart from "./ScrobbleChart";
+
import ProfileLayout from "./ProfileLayout";
export default function Profile() {
const { handle } = useParams<{ handle: string }>();
const queryVariables = useMemo(() => {
-
// Round to start of day to keep timestamp stable
-
const now = new Date();
-
now.setHours(0, 0, 0, 0);
-
const ninetyDaysAgo = new Date(now.getTime() - 90 * 24 * 60 * 60 * 1000);
-
return {
where: { actorHandle: { eq: handle } },
-
chartWhere: {
-
actorHandle: { eq: handle },
-
playedTime: {
-
gte: ninetyDaysAgo.toISOString(),
-
},
-
},
};
}, [handle]);
const queryData = useLazyLoadQuery<ProfileQueryType>(
graphql`
-
query ProfileQuery($where: FmTealAlphaFeedPlayWhereInput!, $chartWhere: FmTealAlphaFeedPlayWhereInput!) {
+
query ProfileQuery($where: FmTealAlphaFeedPlayWhereInput!) {
...Profile_plays @arguments(where: $where)
-
...ScrobbleChart_data
}
`,
-
queryVariables
+
queryVariables,
);
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment<
···
edges {
node {
...TrackItem_play
-
actorHandle
-
appBskyActorProfile {
-
displayName
-
description
-
avatar {
-
url(preset: "avatar")
-
}
-
}
}
}
}
}
`,
-
queryData
+
queryData,
);
const loadMoreRef = useRef<HTMLDivElement>(null);
const plays = useMemo(
-
() => data?.fmTealAlphaFeedPlays?.edges?.map((edge) => edge.node).filter((n) => n != null) || [],
-
[data?.fmTealAlphaFeedPlays?.edges]
+
() =>
+
data?.fmTealAlphaFeedPlays?.edges?.map((edge) => edge.node).filter((n) =>
+
n != null
+
) || [],
+
[data?.fmTealAlphaFeedPlays?.edges],
);
-
const profile = plays?.[0]?.appBskyActorProfile;
useEffect(() => {
window.scrollTo(0, 0);
···
loadNext(20);
}
},
-
{ threshold: 0.1 }
+
{ threshold: 0.1 },
);
observer.observe(loadMoreRef.current);
···
}, [hasNext, isLoadingNext, loadNext]);
return (
-
<div className="min-h-screen bg-zinc-950 text-zinc-300 font-mono">
-
<div className="max-w-4xl mx-auto px-6 py-12">
-
<Link
-
to="/"
-
className="px-2 py-1 text-xs text-zinc-500 hover:text-zinc-300 transition-colors inline-block mb-8"
-
>
-
โ† Back
-
</Link>
-
-
<div className="mb-12 border-b border-zinc-800 pb-6 relative">
-
<div className="absolute inset-0 pointer-events-none opacity-40">
-
<ScrobbleChart queryRef={queryData} />
-
</div>
-
<div className="relative flex items-start gap-6">
-
{profile?.avatar?.url && (
-
<img
-
src={profile.avatar.url}
-
alt={profile.displayName ?? handle ?? "User"}
-
className="w-16 h-16 flex-shrink-0 object-cover"
-
/>
-
)}
-
<div className="flex-1">
-
<h1 className="text-lg font-medium mb-1 text-zinc-100">
-
{profile?.displayName ?? handle}
-
</h1>
-
<p className="text-xs text-zinc-500 mb-2">@{handle}</p>
-
{profile?.description && (
-
<p className="text-xs text-zinc-400">{profile.description}</p>
-
)}
-
</div>
-
</div>
-
</div>
+
//@ts-expect-error: idk
+
<ProfileLayout handle={handle!}>
+
<div className="mb-8">
+
<p className="text-xs text-zinc-500 uppercase tracking-wider">
+
{(data?.fmTealAlphaFeedPlays?.totalCount ?? 0).toLocaleString()}{" "}
+
scrobbles
+
</p>
+
</div>
-
<div className="mb-8">
-
<h2 className="text-sm font-medium uppercase tracking-wider text-zinc-400 mb-2">Recent Tracks</h2>
-
<p className="text-xs text-zinc-500 uppercase tracking-wider">
-
{(data?.fmTealAlphaFeedPlays?.totalCount ?? 0).toLocaleString()} scrobbles
-
</p>
-
</div>
-
-
<div className="space-y-1">
-
{plays && plays.length > 0 ? (
+
<div className="space-y-1">
+
{plays && plays.length > 0
+
? (
plays.map((play, index) => <TrackItem key={index} play={play} />)
-
) : (
+
)
+
: (
<p className="text-zinc-600 text-center py-8 text-xs uppercase tracking-wider">
No tracks found for this user
</p>
)}
-
</div>
+
</div>
-
{hasNext && (
-
<div ref={loadMoreRef} className="py-12 text-center">
-
{isLoadingNext ? (
-
<p className="text-xs text-zinc-600 uppercase tracking-wider">Loading...</p>
-
) : (
-
<p className="text-xs text-zinc-700 uppercase tracking-wider">ยท</p>
+
{hasNext && (
+
<div ref={loadMoreRef} className="py-12 text-center">
+
{isLoadingNext
+
? (
+
<p className="text-xs text-zinc-600 uppercase tracking-wider">
+
Loading...
+
</p>
+
)
+
: (
+
<p className="text-xs text-zinc-700 uppercase tracking-wider">
+
ยท
+
</p>
)}
-
</div>
-
)}
-
</div>
-
</div>
+
</div>
+
)}
+
</ProfileLayout>
);
}
+117
src/ProfileLayout.tsx
···
+
import { graphql, useLazyLoadQuery } from "react-relay";
+
import { Link, NavLink, useParams } from "react-router-dom";
+
import { useMemo, type PropsWithChildren } from "react";
+
import type { ProfileLayoutQuery as ProfileLayoutQueryType } from "./__generated__/ProfileLayoutQuery.graphql";
+
import ScrobbleChart from "./ScrobbleChart";
+
+
export default function ProfileLayout({ children }: PropsWithChildren) {
+
const { handle } = useParams<{ handle: string }>();
+
+
const queryVariables = useMemo(() => {
+
// Round to start of day to keep timestamp stable
+
const now = new Date();
+
now.setHours(0, 0, 0, 0);
+
const ninetyDaysAgo = new Date(now.getTime() - 90 * 24 * 60 * 60 * 1000);
+
+
return {
+
where: { actorHandle: { eq: handle } },
+
chartWhere: {
+
actorHandle: { eq: handle },
+
playedTime: {
+
gte: ninetyDaysAgo.toISOString(),
+
},
+
},
+
};
+
}, [handle]);
+
+
const queryData = useLazyLoadQuery<ProfileLayoutQueryType>(
+
graphql`
+
query ProfileLayoutQuery($where: FmTealAlphaFeedPlayWhereInput!, $chartWhere: FmTealAlphaFeedPlayWhereInput!) {
+
...ScrobbleChart_data
+
fmTealAlphaFeedPlays(
+
first: 1
+
sortBy: [{ field: playedTime, direction: desc }]
+
where: $where
+
) {
+
edges {
+
node {
+
actorHandle
+
appBskyActorProfile {
+
displayName
+
description
+
avatar {
+
url(preset: "avatar")
+
}
+
}
+
}
+
}
+
}
+
}
+
`,
+
queryVariables
+
);
+
+
const profile = queryData?.fmTealAlphaFeedPlays?.edges?.[0]?.node?.appBskyActorProfile;
+
+
return (
+
<div className="min-h-screen bg-zinc-950 text-zinc-300 font-mono">
+
<div className="max-w-4xl mx-auto px-6 py-12">
+
<Link
+
to="/"
+
className="px-2 py-1 text-xs text-zinc-500 hover:text-zinc-300 transition-colors inline-block mb-8"
+
>
+
โ† Back
+
</Link>
+
+
<div className="mb-12 border-b border-zinc-800 pb-6 relative">
+
<div className="absolute inset-0 pointer-events-none opacity-40">
+
<ScrobbleChart queryRef={queryData} />
+
</div>
+
<div className="relative flex items-start gap-6">
+
{profile?.avatar?.url && (
+
<img
+
src={profile.avatar.url}
+
alt={profile.displayName ?? handle ?? "User"}
+
className="w-16 h-16 flex-shrink-0 object-cover"
+
/>
+
)}
+
<div className="flex-1">
+
<h1 className="text-lg font-medium mb-1 text-zinc-100">
+
{profile?.displayName ?? handle}
+
</h1>
+
<p className="text-xs text-zinc-500 mb-2">@{handle}</p>
+
{profile?.description && (
+
<p className="text-xs text-zinc-400">{profile.description}</p>
+
)}
+
</div>
+
</div>
+
</div>
+
+
<div className="flex items-center border-b border-zinc-800 mb-8">
+
<NavLink
+
to={`/profile/${handle}/scrobbles`}
+
className={({ isActive }) =>
+
`px-4 py-2 text-xs uppercase tracking-wider ${
+
isActive ? "text-zinc-100 border-b-2 border-zinc-100" : "text-zinc-500 hover:text-zinc-300"
+
}`
+
}
+
>
+
Scrobbles
+
</NavLink>
+
<NavLink
+
to={`/profile/${handle}/overall`}
+
className={({ isActive }) =>
+
`px-4 py-2 text-xs uppercase tracking-wider ${
+
isActive ? "text-zinc-100 border-b-2 border-zinc-100" : "text-zinc-500 hover:text-zinc-300"
+
}`
+
}
+
>
+
Overall
+
</NavLink>
+
</div>
+
+
{children}
+
</div>
+
</div>
+
);
+
}
+82
src/ProfileTopAlbums.tsx
···
+
import { graphql, useLazyLoadQuery } from "react-relay";
+
import { useParams } from "react-router-dom";
+
import type { ProfileTopAlbumsQuery } from "./__generated__/ProfileTopAlbumsQuery.graphql";
+
import AlbumItem from "./AlbumItem";
+
import { useDateRangeFilter } from "./useDateRangeFilter";
+
import { useMemo } from "react";
+
+
export default function ProfileTopAlbums() {
+
const { handle, period } = useParams<{ handle: string; period?: string }>();
+
const dateRangeVariables = useDateRangeFilter(period);
+
+
const queryVariables = useMemo(() => {
+
return {
+
where: {
+
...dateRangeVariables.where,
+
actorHandle: { eq: handle },
+
},
+
};
+
}, [handle, dateRangeVariables]);
+
+
const data = useLazyLoadQuery<ProfileTopAlbumsQuery>(
+
graphql`
+
query ProfileTopAlbumsQuery($where: FmTealAlphaFeedPlayWhereInput) {
+
fmTealAlphaFeedPlaysAggregated(
+
groupBy: [{ field: releaseMbId }, { field: releaseName }, { field: artists }]
+
orderBy: { count: desc }
+
limit: 50
+
where: $where
+
) {
+
releaseMbId
+
releaseName
+
artists
+
count
+
}
+
}
+
`,
+
queryVariables,
+
{ fetchKey: `${handle}-${period || "all"}`, fetchPolicy: "store-or-network" }
+
);
+
+
const albums = [...(data.fmTealAlphaFeedPlaysAggregated || [])];
+
+
// Deduplicate by release name, keeping the one with highest count
+
// Prefer entries with artist data
+
const seenNames = new Set<string>();
+
const dedupedAlbums = albums
+
.sort((a, b) => {
+
// First sort by count (already sorted from query)
+
if (b.count !== a.count) return b.count - a.count;
+
// Then prefer entries with artists data
+
if (a.artists && !b.artists) return -1;
+
if (!a.artists && b.artists) return 1;
+
return 0;
+
})
+
.filter((album) => {
+
const name = album.releaseName || "Unknown Album";
+
if (seenNames.has(name)) {
+
return false;
+
}
+
seenNames.add(name);
+
return true;
+
})
+
.slice(0, 10);
+
+
const maxCount = dedupedAlbums.length > 0 ? dedupedAlbums[0].count : 0;
+
+
return (
+
<div className="space-y-1">
+
{dedupedAlbums.map((album, index) => (
+
<AlbumItem
+
key={album.releaseMbId || index}
+
releaseName={album.releaseName || "Unknown Album"}
+
releaseMbId={album.releaseMbId}
+
artists={album.artists}
+
count={album.count}
+
rank={index + 1}
+
maxCount={maxCount}
+
/>
+
))}
+
</div>
+
);
+
}
+89
src/ProfileTopArtists.tsx
···
+
import { graphql, useLazyLoadQuery } from "react-relay";
+
import { useParams } from "react-router-dom";
+
import type { ProfileTopArtistsQuery } from "./__generated__/ProfileTopArtistsQuery.graphql";
+
import { useDateRangeFilter } from "./useDateRangeFilter";
+
import ArtistItem from "./ArtistItem";
+
import { useMemo } from "react";
+
+
export default function ProfileTopArtists() {
+
const { handle, period } = useParams<{ handle: string; period?: string }>();
+
const dateRangeVariables = useDateRangeFilter(period);
+
+
const queryVariables = useMemo(() => {
+
return {
+
where: {
+
...dateRangeVariables.where,
+
actorHandle: { eq: handle },
+
},
+
};
+
}, [handle, dateRangeVariables]);
+
+
const data = useLazyLoadQuery<ProfileTopArtistsQuery>(
+
graphql`
+
query ProfileTopArtistsQuery($where: FmTealAlphaFeedPlayWhereInput) {
+
fmTealAlphaFeedPlaysAggregated(
+
groupBy: [{ field: artists }]
+
orderBy: { count: desc }
+
limit: 50
+
where: $where
+
) {
+
artists
+
count
+
}
+
}
+
`,
+
queryVariables,
+
{ fetchKey: `${handle}-${period || "all"}`, fetchPolicy: "store-or-network" }
+
);
+
+
const processedArtists = useMemo(() => {
+
const artistCounts: { [key: string]: number } = {};
+
+
(data.fmTealAlphaFeedPlaysAggregated || []).forEach((row) => {
+
if (!row.artists) return;
+
+
let names: string[] = [];
+
+
try {
+
const parsed = typeof row.artists === 'string' ? JSON.parse(row.artists) : row.artists;
+
+
if (Array.isArray(parsed)) {
+
names = parsed.map((a: { artistName: string }) => a.artistName.trim());
+
} else if (typeof parsed === 'string') {
+
names = parsed.split(',').map(s => s.trim());
+
}
+
} catch (e) {
+
if (typeof row.artists === 'string') {
+
names = row.artists.split(',').map(s => s.trim());
+
}
+
}
+
+
names.forEach(name => {
+
if (name) {
+
artistCounts[name] = (artistCounts[name] || 0) + row.count;
+
}
+
});
+
});
+
+
return Object.entries(artistCounts)
+
.map(([name, count]) => ({ artists: name, count }))
+
.sort((a, b) => b.count - a.count)
+
.slice(0, 10);
+
}, [data.fmTealAlphaFeedPlaysAggregated]);
+
+
const maxCount = processedArtists.length > 0 ? processedArtists[0].count : 0;
+
+
return (
+
<div className="space-y-1">
+
{processedArtists.map((artist, index) => (
+
<ArtistItem
+
key={`${artist.artists}-${index}`}
+
artists={artist.artists || "Unknown Artist"}
+
count={artist.count}
+
rank={index + 1}
+
maxCount={maxCount}
+
/>
+
))}
+
</div>
+
);
+
}
+59
src/ProfileTopTracks.tsx
···
+
import { graphql, useLazyLoadQuery } from "react-relay";
+
import { useParams } from "react-router-dom";
+
import type { ProfileTopTracksQuery } from "./__generated__/ProfileTopTracksQuery.graphql";
+
import TopTrackItem from "./TopTrackItem";
+
import { useDateRangeFilter } from "./useDateRangeFilter";
+
import { useMemo } from "react";
+
+
export default function ProfileTopTracks() {
+
const { handle, period } = useParams<{ handle: string; period?: string }>();
+
const dateRangeVariables = useDateRangeFilter(period);
+
+
const queryVariables = useMemo(() => {
+
return {
+
where: {
+
...dateRangeVariables.where,
+
actorHandle: { eq: handle },
+
},
+
};
+
}, [handle, dateRangeVariables]);
+
+
const data = useLazyLoadQuery<ProfileTopTracksQuery>(
+
graphql`
+
query ProfileTopTracksQuery($where: FmTealAlphaFeedPlayWhereInput) {
+
fmTealAlphaFeedPlaysAggregated(
+
groupBy: [{ field: trackName }, { field: releaseMbId }, { field: artists }]
+
orderBy: { count: desc }
+
limit: 10
+
where: $where
+
) {
+
trackName
+
releaseMbId
+
artists
+
count
+
}
+
}
+
`,
+
queryVariables,
+
{ fetchKey: `${handle}-${period || "all"}`, fetchPolicy: "store-or-network" }
+
);
+
+
const tracks = data.fmTealAlphaFeedPlaysAggregated || [];
+
const maxCount = tracks.length > 0 ? tracks[0].count : 0;
+
+
return (
+
<div className="space-y-1">
+
{tracks.map((track, index) => (
+
<TopTrackItem
+
key={`${track.trackName}-${index}`}
+
trackName={track.trackName || "Unknown Track"}
+
releaseMbId={track.releaseMbId}
+
artists={track.artists || "Unknown Artist"}
+
count={track.count}
+
rank={index + 1}
+
maxCount={maxCount}
+
/>
+
))}
+
</div>
+
);
+
}
+48
src/TopArtists.tsx
···
+
import { graphql, useLazyLoadQuery } from "react-relay";
+
import { useParams } from "react-router-dom";
+
import type { TopArtistsQuery } from "./__generated__/TopArtistsQuery.graphql";
+
import Layout from "./Layout";
+
import { useDateRangeFilter } from "./useDateRangeFilter";
+
import ArtistItem from "./ArtistItem";
+
+
export default function TopArtists() {
+
const { period } = useParams<{ period?: string }>();
+
const queryVariables = useDateRangeFilter(period);
+
+
const data = useLazyLoadQuery<TopArtistsQuery>(
+
graphql`
+
query TopArtistsQuery($where: FmTealAlphaFeedPlayWhereInput) {
+
fmTealAlphaFeedPlaysAggregated(
+
groupBy: [{ field: artists }]
+
orderBy: { count: desc }
+
limit: 50
+
where: $where
+
) {
+
artists
+
count
+
}
+
}
+
`,
+
queryVariables,
+
{ fetchKey: period || "all", fetchPolicy: "store-or-network" }
+
);
+
+
const artists = data.fmTealAlphaFeedPlaysAggregated || [];
+
const maxCount = artists.length > 0 ? artists[0].count : 0;
+
+
return (
+
<Layout>
+
<div className="space-y-1">
+
{artists.map((artist, index) => (
+
<ArtistItem
+
key={`${artist.artists}-${index}`}
+
artists={artist.artists || "Unknown Artist"}
+
count={artist.count}
+
rank={index + 1}
+
maxCount={maxCount}
+
/>
+
))}
+
</div>
+
</Layout>
+
);
+
}
+1 -1
src/TopTracks.tsx
···
}
`,
queryVariables,
-
{ fetchKey: period || "all", fetchPolicy: "store-or-network" }
+
{ fetchKey: period || "all", fetchPolicy: "store-or-network" },
);
const tracks = data.fmTealAlphaFeedPlaysAggregated || [];
+4 -1
src/TrackItem.tsx
···
fragment TrackItem_play on FmTealAlphaFeedPlay {
trackName
playedTime
-
artists
+
artists {
+
artistName
+
artistMbId
+
}
releaseName
releaseMbId
actorHandle
+33 -6
src/__generated__/AppPaginationQuery.graphql.ts
···
/**
-
* @generated SignedSource<<38f32c1e1448eb48251113a07e781789>>
+
* @generated SignedSource<<4144e88e9b03430408917b25e498a033>>
* @lightSyntaxTransform
* @nogrep
*/
···
}
]
}
-
];
+
],
+
v2 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
+
"storageKey": null
+
};
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
···
{
"alias": null,
"args": null,
-
"kind": "ScalarField",
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"kind": "ScalarField",
"name": "displayName",
"storageKey": null
-
}
+
},
+
(v2/*: any*/)
],
"storageKey": null
},
+
(v2/*: any*/),
{
"alias": null,
"args": null,
···
]
},
"params": {
-
"cacheID": "cb24b99f8b849bdfc642275cfd4df3fe",
+
"cacheID": "d41913a8ba0cde3255c03b34e36f4baf",
"id": null,
"metadata": {},
"name": "AppPaginationQuery",
"operationKind": "query",
-
"text": "query AppPaginationQuery(\n $count: Int = 20\n $cursor: String\n) {\n ...App_plays_1G22uz\n}\n\nfragment App_plays_1G22uz on Query {\n fmTealAlphaFeedPlays(first: $count, after: $cursor, sortBy: [{field: playedTime, direction: desc}]) {\n totalCount\n edges {\n node {\n playedTime\n ...TrackItem_play\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n }\n}\n"
+
"text": "query AppPaginationQuery(\n $count: Int = 20\n $cursor: String\n) {\n ...App_plays_1G22uz\n}\n\nfragment App_plays_1G22uz on Query {\n fmTealAlphaFeedPlays(first: $count, after: $cursor, sortBy: [{field: playedTime, direction: desc}]) {\n totalCount\n edges {\n node {\n playedTime\n ...TrackItem_play\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists {\n artistName\n artistMbId\n }\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n id\n }\n}\n"
}
};
})();
+36 -5
src/__generated__/AppQuery.graphql.ts
···
/**
-
* @generated SignedSource<<bd4d57eff6a192efe2535389231fe37e>>
+
* @generated SignedSource<<4eadb1b67651fecb72943df792f91938>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { FragmentRefs } from "relay-runtime";
export type FmTealAlphaFeedPlayWhereInput = {
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
artistMbIds?: StringFilter | null | undefined;
artistNames?: StringFilter | null | undefined;
artists?: StringFilter | null | undefined;
···
duration?: IntFilter | null | undefined;
indexedAt?: DateTimeFilter | null | undefined;
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
originUrl?: StringFilter | null | undefined;
playedTime?: StringFilter | null | undefined;
recordingMbId?: StringFilter | null | undefined;
···
export type StringFilter = {
contains?: string | null | undefined;
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
gt?: string | null | undefined;
gte?: string | null | undefined;
in?: ReadonlyArray<string | null | undefined> | null | undefined;
···
"kind": "ScalarField",
"name": "playedTime",
"storageKey": null
+
},
+
v3 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
+
"storageKey": null
};
return {
"fragment": {
···
{
"alias": null,
"args": null,
-
"kind": "ScalarField",
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"kind": "ScalarField",
"name": "displayName",
"storageKey": null
-
}
+
},
+
(v3/*: any*/)
],
"storageKey": null
},
+
(v3/*: any*/),
{
"alias": null,
"args": null,
···
]
},
"params": {
-
"cacheID": "038b79e3af13c34df9bfca055c5f7829",
+
"cacheID": "ab3827e5716f65074a802ddb36f66d2b",
"id": null,
"metadata": {},
"name": "AppQuery",
"operationKind": "query",
-
"text": "query AppQuery(\n $chartWhere: FmTealAlphaFeedPlayWhereInput!\n) {\n ...App_plays\n ...ScrobbleChart_data\n}\n\nfragment App_plays on Query {\n fmTealAlphaFeedPlays(first: 20, sortBy: [{field: playedTime, direction: desc}]) {\n totalCount\n edges {\n node {\n playedTime\n ...TrackItem_play\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment ScrobbleChart_data on Query {\n chartData: fmTealAlphaFeedPlaysAggregated(groupBy: [{field: playedTime, interval: day}], where: $chartWhere, limit: 90) {\n playedTime\n count\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n }\n}\n"
+
"text": "query AppQuery(\n $chartWhere: FmTealAlphaFeedPlayWhereInput!\n) {\n ...App_plays\n ...ScrobbleChart_data\n}\n\nfragment App_plays on Query {\n fmTealAlphaFeedPlays(first: 20, sortBy: [{field: playedTime, direction: desc}]) {\n totalCount\n edges {\n node {\n playedTime\n ...TrackItem_play\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment ScrobbleChart_data on Query {\n chartData: fmTealAlphaFeedPlaysAggregated(groupBy: [{field: playedTime, interval: day}], where: $chartWhere, limit: 90) {\n playedTime\n count\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists {\n artistName\n artistMbId\n }\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n id\n }\n}\n"
}
};
})();
+33 -6
src/__generated__/AppSubscription.graphql.ts
···
/**
-
* @generated SignedSource<<0e4c25e0e4257b2c7042e374f3568241>>
+
* @generated SignedSource<<f0666e46fa4693a3d7869f9de0266bab>>
* @lightSyntaxTransform
* @nogrep
*/
···
"args": null,
"kind": "ScalarField",
"name": "playedTime",
+
"storageKey": null
+
},
+
v2 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
"storageKey": null
};
return {
···
{
"alias": null,
"args": null,
-
"kind": "ScalarField",
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"kind": "ScalarField",
"name": "displayName",
"storageKey": null
-
}
+
},
+
(v2/*: any*/)
],
"storageKey": null
-
}
+
},
+
(v2/*: any*/)
],
"storageKey": null
}
]
},
"params": {
-
"cacheID": "d2419c5bef1474c19f75ee5b97062013",
+
"cacheID": "f547109f04ecd8d1a8679dbf0b7f98b4",
"id": null,
"metadata": {},
"name": "AppSubscription",
"operationKind": "subscription",
-
"text": "subscription AppSubscription {\n fmTealAlphaFeedPlayCreated {\n uri\n playedTime\n ...TrackItem_play\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n }\n}\n"
+
"text": "subscription AppSubscription {\n fmTealAlphaFeedPlayCreated {\n uri\n playedTime\n ...TrackItem_play\n id\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists {\n artistName\n artistMbId\n }\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n id\n }\n}\n"
}
};
})();
+190
src/__generated__/OverallQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<be6b74e81f17f155aaa1449350560e4d>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type OverallQuery$variables = {
+
where?: FmTealAlphaFeedPlayWhereInput | null | undefined;
+
};
+
export type OverallQuery$data = {
+
readonly fmTealAlphaFeedPlaysAggregated: ReadonlyArray<{
+
readonly artists: any | null | undefined;
+
readonly count: number;
+
readonly releaseMbId: any | null | undefined;
+
readonly releaseName: any | null | undefined;
+
}>;
+
};
+
export type OverallQuery = {
+
response: OverallQuery$data;
+
variables: OverallQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
+
v1 = [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "releaseMbId"
+
},
+
{
+
"field": "releaseName"
+
},
+
{
+
"field": "artists"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 20
+
},
+
{
+
"kind": "Literal",
+
"name": "orderBy",
+
"value": {
+
"count": "desc"
+
}
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "releaseMbId",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "releaseName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artists",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
];
+
return {
+
"fragment": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "OverallQuery",
+
"selections": (v1/*: any*/),
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Operation",
+
"name": "OverallQuery",
+
"selections": (v1/*: any*/)
+
},
+
"params": {
+
"cacheID": "8f8e0d5f64fdc442abebba83c5108588",
+
"id": null,
+
"metadata": {},
+
"name": "OverallQuery",
+
"operationKind": "query",
+
"text": "query OverallQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: releaseMbId}, {field: releaseName}, {field: artists}], orderBy: {count: desc}, limit: 20, where: $where) {\n releaseMbId\n releaseName\n artists\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "0fe8889cb7ff66cacf0605bf0cad4cb2";
+
+
export default node;
+361
src/__generated__/ProfileLayoutQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<d13059845ad242da48faf0e8ee3fae93>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
import { FragmentRefs } from "relay-runtime";
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type ProfileLayoutQuery$variables = {
+
chartWhere: FmTealAlphaFeedPlayWhereInput;
+
where: FmTealAlphaFeedPlayWhereInput;
+
};
+
export type ProfileLayoutQuery$data = {
+
readonly fmTealAlphaFeedPlays: {
+
readonly edges: ReadonlyArray<{
+
readonly node: {
+
readonly actorHandle: string | null | undefined;
+
readonly appBskyActorProfile: {
+
readonly avatar: {
+
readonly url: string;
+
} | null | undefined;
+
readonly description: string | null | undefined;
+
readonly displayName: string | null | undefined;
+
} | null | undefined;
+
};
+
}>;
+
};
+
readonly " $fragmentSpreads": FragmentRefs<"ScrobbleChart_data">;
+
};
+
export type ProfileLayoutQuery = {
+
response: ProfileLayoutQuery$data;
+
variables: ProfileLayoutQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = {
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "chartWhere"
+
},
+
v1 = {
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
},
+
v2 = [
+
{
+
"kind": "Literal",
+
"name": "first",
+
"value": 1
+
},
+
{
+
"kind": "Literal",
+
"name": "sortBy",
+
"value": [
+
{
+
"direction": "desc",
+
"field": "playedTime"
+
}
+
]
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
v3 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "actorHandle",
+
"storageKey": null
+
},
+
v4 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "displayName",
+
"storageKey": null
+
},
+
v5 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "description",
+
"storageKey": null
+
},
+
v6 = {
+
"alias": null,
+
"args": null,
+
"concreteType": "Blob",
+
"kind": "LinkedField",
+
"name": "avatar",
+
"plural": false,
+
"selections": [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "preset",
+
"value": "avatar"
+
}
+
],
+
"kind": "ScalarField",
+
"name": "url",
+
"storageKey": "url(preset:\"avatar\")"
+
}
+
],
+
"storageKey": null
+
},
+
v7 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
+
"storageKey": null
+
};
+
return {
+
"fragment": {
+
"argumentDefinitions": [
+
(v0/*: any*/),
+
(v1/*: any*/)
+
],
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "ProfileLayoutQuery",
+
"selections": [
+
{
+
"args": null,
+
"kind": "FragmentSpread",
+
"name": "ScrobbleChart_data"
+
},
+
{
+
"alias": null,
+
"args": (v2/*: any*/),
+
"concreteType": "FmTealAlphaFeedPlayConnection",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlays",
+
"plural": false,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "FmTealAlphaFeedPlayEdge",
+
"kind": "LinkedField",
+
"name": "edges",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "FmTealAlphaFeedPlay",
+
"kind": "LinkedField",
+
"name": "node",
+
"plural": false,
+
"selections": [
+
(v3/*: any*/),
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "AppBskyActorProfile",
+
"kind": "LinkedField",
+
"name": "appBskyActorProfile",
+
"plural": false,
+
"selections": [
+
(v4/*: any*/),
+
(v5/*: any*/),
+
(v6/*: any*/)
+
],
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
],
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": [
+
(v1/*: any*/),
+
(v0/*: any*/)
+
],
+
"kind": "Operation",
+
"name": "ProfileLayoutQuery",
+
"selections": [
+
{
+
"alias": "chartData",
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "playedTime",
+
"interval": "day"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 90
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "chartWhere"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "playedTime",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": (v2/*: any*/),
+
"concreteType": "FmTealAlphaFeedPlayConnection",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlays",
+
"plural": false,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "FmTealAlphaFeedPlayEdge",
+
"kind": "LinkedField",
+
"name": "edges",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "FmTealAlphaFeedPlay",
+
"kind": "LinkedField",
+
"name": "node",
+
"plural": false,
+
"selections": [
+
(v3/*: any*/),
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "AppBskyActorProfile",
+
"kind": "LinkedField",
+
"name": "appBskyActorProfile",
+
"plural": false,
+
"selections": [
+
(v4/*: any*/),
+
(v5/*: any*/),
+
(v6/*: any*/),
+
(v7/*: any*/)
+
],
+
"storageKey": null
+
},
+
(v7/*: any*/)
+
],
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
]
+
},
+
"params": {
+
"cacheID": "df91116d25da921e74bc825710304143",
+
"id": null,
+
"metadata": {},
+
"name": "ProfileLayoutQuery",
+
"operationKind": "query",
+
"text": "query ProfileLayoutQuery(\n $where: FmTealAlphaFeedPlayWhereInput!\n $chartWhere: FmTealAlphaFeedPlayWhereInput!\n) {\n ...ScrobbleChart_data\n fmTealAlphaFeedPlays(first: 1, sortBy: [{field: playedTime, direction: desc}], where: $where) {\n edges {\n node {\n actorHandle\n appBskyActorProfile {\n displayName\n description\n avatar {\n url(preset: \"avatar\")\n }\n id\n }\n id\n }\n }\n }\n}\n\nfragment ScrobbleChart_data on Query {\n chartData: fmTealAlphaFeedPlaysAggregated(groupBy: [{field: playedTime, interval: day}], where: $chartWhere, limit: 90) {\n playedTime\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "41d50b6c47174293deb76769f8f04b78";
+
+
export default node;
+37 -37
src/__generated__/ProfilePaginationQuery.graphql.ts
···
/**
-
* @generated SignedSource<<05e7a8d8804cbbe062ff7dce37522623>>
+
* @generated SignedSource<<daf74bb66a4e6d9119e3b571e872c199>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { FragmentRefs } from "relay-runtime";
export type FmTealAlphaFeedPlayWhereInput = {
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
artistMbIds?: StringFilter | null | undefined;
artistNames?: StringFilter | null | undefined;
artists?: StringFilter | null | undefined;
···
duration?: IntFilter | null | undefined;
indexedAt?: DateTimeFilter | null | undefined;
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
originUrl?: StringFilter | null | undefined;
playedTime?: StringFilter | null | undefined;
recordingMbId?: StringFilter | null | undefined;
···
export type StringFilter = {
contains?: string | null | undefined;
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
gt?: string | null | undefined;
gte?: string | null | undefined;
in?: ReadonlyArray<string | null | undefined> | null | undefined;
···
]
},
(v1/*: any*/)
-
];
+
],
+
v3 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
+
"storageKey": null
+
};
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
···
{
"alias": null,
"args": null,
-
"kind": "ScalarField",
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"name": "displayName",
"storageKey": null
},
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "description",
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"concreteType": "Blob",
-
"kind": "LinkedField",
-
"name": "avatar",
-
"plural": false,
-
"selections": [
-
{
-
"alias": null,
-
"args": [
-
{
-
"kind": "Literal",
-
"name": "preset",
-
"value": "avatar"
-
}
-
],
-
"kind": "ScalarField",
-
"name": "url",
-
"storageKey": "url(preset:\"avatar\")"
-
}
-
],
-
"storageKey": null
-
}
+
(v3/*: any*/)
],
"storageKey": null
},
+
(v3/*: any*/),
{
"alias": null,
"args": null,
···
]
},
"params": {
-
"cacheID": "72ce84bf8cc8ac016e19ca462a2f7b70",
+
"cacheID": "a74a6087f9fec6f56ec166df70ad6365",
"id": null,
"metadata": {},
"name": "ProfilePaginationQuery",
"operationKind": "query",
-
"text": "query ProfilePaginationQuery(\n $count: Int = 20\n $cursor: String\n $where: FmTealAlphaFeedPlayWhereInput!\n) {\n ...Profile_plays_mjR8k\n}\n\nfragment Profile_plays_mjR8k on Query {\n fmTealAlphaFeedPlays(first: $count, after: $cursor, sortBy: [{field: playedTime, direction: desc}], where: $where) {\n totalCount\n edges {\n node {\n ...TrackItem_play\n actorHandle\n appBskyActorProfile {\n displayName\n description\n avatar {\n url(preset: \"avatar\")\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n }\n}\n"
+
"text": "query ProfilePaginationQuery(\n $count: Int = 20\n $cursor: String\n $where: FmTealAlphaFeedPlayWhereInput!\n) {\n ...Profile_plays_mjR8k\n}\n\nfragment Profile_plays_mjR8k on Query {\n fmTealAlphaFeedPlays(first: $count, after: $cursor, sortBy: [{field: playedTime, direction: desc}], where: $where) {\n totalCount\n edges {\n node {\n ...TrackItem_play\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists {\n artistName\n artistMbId\n }\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n id\n }\n}\n"
}
};
})();
-
(node as any).hash = "fb9d67e8cd94c4191b9956225ff78bdf";
+
(node as any).hash = "42b3df3f8d988503f2b08000f01b4c83";
export default node;
+52 -108
src/__generated__/ProfileQuery.graphql.ts
···
/**
-
* @generated SignedSource<<8d62f515b7652094345304e43124aa72>>
+
* @generated SignedSource<<29d2f6473f1660ade97d5a93c8cab01a>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { FragmentRefs } from "relay-runtime";
export type FmTealAlphaFeedPlayWhereInput = {
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
artistMbIds?: StringFilter | null | undefined;
artistNames?: StringFilter | null | undefined;
artists?: StringFilter | null | undefined;
···
duration?: IntFilter | null | undefined;
indexedAt?: DateTimeFilter | null | undefined;
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
originUrl?: StringFilter | null | undefined;
playedTime?: StringFilter | null | undefined;
recordingMbId?: StringFilter | null | undefined;
···
export type StringFilter = {
contains?: string | null | undefined;
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
gt?: string | null | undefined;
gte?: string | null | undefined;
in?: ReadonlyArray<string | null | undefined> | null | undefined;
···
lte?: number | null | undefined;
};
export type ProfileQuery$variables = {
-
chartWhere: FmTealAlphaFeedPlayWhereInput;
where: FmTealAlphaFeedPlayWhereInput;
};
export type ProfileQuery$data = {
-
readonly " $fragmentSpreads": FragmentRefs<"Profile_plays" | "ScrobbleChart_data">;
+
readonly " $fragmentSpreads": FragmentRefs<"Profile_plays">;
};
export type ProfileQuery = {
response: ProfileQuery$data;
···
};
const node: ConcreteRequest = (function(){
-
var v0 = {
-
"defaultValue": null,
-
"kind": "LocalArgument",
-
"name": "chartWhere"
-
},
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
v1 = {
-
"defaultValue": null,
-
"kind": "LocalArgument",
-
"name": "where"
-
},
-
v2 = {
"kind": "Variable",
"name": "where",
"variableName": "where"
},
-
v3 = [
+
v2 = [
{
"kind": "Literal",
"name": "first",
···
}
]
},
-
(v2/*: any*/)
+
(v1/*: any*/)
],
-
v4 = {
+
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
-
"name": "playedTime",
+
"name": "id",
"storageKey": null
};
return {
"fragment": {
-
"argumentDefinitions": [
-
(v0/*: any*/),
-
(v1/*: any*/)
-
],
+
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "ProfileQuery",
"selections": [
{
"args": [
-
(v2/*: any*/)
+
(v1/*: any*/)
],
"kind": "FragmentSpread",
"name": "Profile_plays"
-
},
-
{
-
"args": null,
-
"kind": "FragmentSpread",
-
"name": "ScrobbleChart_data"
}
],
"type": "Query",
···
},
"kind": "Request",
"operation": {
-
"argumentDefinitions": [
-
(v1/*: any*/),
-
(v0/*: any*/)
-
],
+
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "ProfileQuery",
"selections": [
{
"alias": null,
-
"args": (v3/*: any*/),
+
"args": (v2/*: any*/),
"concreteType": "FmTealAlphaFeedPlayConnection",
"kind": "LinkedField",
"name": "fmTealAlphaFeedPlays",
···
"name": "trackName",
"storageKey": null
},
-
(v4/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
+
"name": "playedTime",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"name": "displayName",
"storageKey": null
},
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "description",
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"concreteType": "Blob",
-
"kind": "LinkedField",
-
"name": "avatar",
-
"plural": false,
-
"selections": [
-
{
-
"alias": null,
-
"args": [
-
{
-
"kind": "Literal",
-
"name": "preset",
-
"value": "avatar"
-
}
-
],
-
"kind": "ScalarField",
-
"name": "url",
-
"storageKey": "url(preset:\"avatar\")"
-
}
-
],
-
"storageKey": null
-
}
+
(v3/*: any*/)
],
"storageKey": null
},
+
(v3/*: any*/),
{
"alias": null,
"args": null,
···
},
{
"alias": null,
-
"args": (v3/*: any*/),
+
"args": (v2/*: any*/),
"filters": [
"where",
"sortBy"
···
"key": "Profile_fmTealAlphaFeedPlays",
"kind": "LinkedHandle",
"name": "fmTealAlphaFeedPlays"
-
},
-
{
-
"alias": "chartData",
-
"args": [
-
{
-
"kind": "Literal",
-
"name": "groupBy",
-
"value": [
-
{
-
"field": "playedTime",
-
"interval": "day"
-
}
-
]
-
},
-
{
-
"kind": "Literal",
-
"name": "limit",
-
"value": 90
-
},
-
{
-
"kind": "Variable",
-
"name": "where",
-
"variableName": "chartWhere"
-
}
-
],
-
"concreteType": "FmTealAlphaFeedPlayAggregated",
-
"kind": "LinkedField",
-
"name": "fmTealAlphaFeedPlaysAggregated",
-
"plural": true,
-
"selections": [
-
(v4/*: any*/),
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "count",
-
"storageKey": null
-
}
-
],
-
"storageKey": null
}
]
},
"params": {
-
"cacheID": "083f03714f183a8e68ff0a6d15f0d757",
+
"cacheID": "d7aed8545b8651ae55d39d275c14fc74",
"id": null,
"metadata": {},
"name": "ProfileQuery",
"operationKind": "query",
-
"text": "query ProfileQuery(\n $where: FmTealAlphaFeedPlayWhereInput!\n $chartWhere: FmTealAlphaFeedPlayWhereInput!\n) {\n ...Profile_plays_3FC4Qo\n ...ScrobbleChart_data\n}\n\nfragment Profile_plays_3FC4Qo on Query {\n fmTealAlphaFeedPlays(first: 20, sortBy: [{field: playedTime, direction: desc}], where: $where) {\n totalCount\n edges {\n node {\n ...TrackItem_play\n actorHandle\n appBskyActorProfile {\n displayName\n description\n avatar {\n url(preset: \"avatar\")\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment ScrobbleChart_data on Query {\n chartData: fmTealAlphaFeedPlaysAggregated(groupBy: [{field: playedTime, interval: day}], where: $chartWhere, limit: 90) {\n playedTime\n count\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n }\n}\n"
+
"text": "query ProfileQuery(\n $where: FmTealAlphaFeedPlayWhereInput!\n) {\n ...Profile_plays_3FC4Qo\n}\n\nfragment Profile_plays_3FC4Qo on Query {\n fmTealAlphaFeedPlays(first: 20, sortBy: [{field: playedTime, direction: desc}], where: $where) {\n totalCount\n edges {\n node {\n ...TrackItem_play\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TrackItem_play on FmTealAlphaFeedPlay {\n trackName\n playedTime\n artists {\n artistName\n artistMbId\n }\n releaseName\n releaseMbId\n actorHandle\n musicServiceBaseDomain\n appBskyActorProfile {\n displayName\n id\n }\n}\n"
}
};
})();
-
(node as any).hash = "e000bb0fb9935e8e853d847c4362ffe6";
+
(node as any).hash = "4a0ecbad0ab4453246cdcdd753b1f84f";
export default node;
+190
src/__generated__/ProfileTopAlbumsQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<f93041e209eda64391ae31c91b5b7c79>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type ProfileTopAlbumsQuery$variables = {
+
where?: FmTealAlphaFeedPlayWhereInput | null | undefined;
+
};
+
export type ProfileTopAlbumsQuery$data = {
+
readonly fmTealAlphaFeedPlaysAggregated: ReadonlyArray<{
+
readonly artists: any | null | undefined;
+
readonly count: number;
+
readonly releaseMbId: any | null | undefined;
+
readonly releaseName: any | null | undefined;
+
}>;
+
};
+
export type ProfileTopAlbumsQuery = {
+
response: ProfileTopAlbumsQuery$data;
+
variables: ProfileTopAlbumsQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
+
v1 = [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "releaseMbId"
+
},
+
{
+
"field": "releaseName"
+
},
+
{
+
"field": "artists"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 50
+
},
+
{
+
"kind": "Literal",
+
"name": "orderBy",
+
"value": {
+
"count": "desc"
+
}
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "releaseMbId",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "releaseName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artists",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
];
+
return {
+
"fragment": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "ProfileTopAlbumsQuery",
+
"selections": (v1/*: any*/),
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Operation",
+
"name": "ProfileTopAlbumsQuery",
+
"selections": (v1/*: any*/)
+
},
+
"params": {
+
"cacheID": "e3dea5c70916481cfc7237ea694fa720",
+
"id": null,
+
"metadata": {},
+
"name": "ProfileTopAlbumsQuery",
+
"operationKind": "query",
+
"text": "query ProfileTopAlbumsQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: releaseMbId}, {field: releaseName}, {field: artists}], orderBy: {count: desc}, limit: 50, where: $where) {\n releaseMbId\n releaseName\n artists\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "61866b819fab81f5acac1c96479417da";
+
+
export default node;
+168
src/__generated__/ProfileTopArtistsQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<4d813a091c04adc8f0f29b7c8a585ca2>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type ProfileTopArtistsQuery$variables = {
+
where?: FmTealAlphaFeedPlayWhereInput | null | undefined;
+
};
+
export type ProfileTopArtistsQuery$data = {
+
readonly fmTealAlphaFeedPlaysAggregated: ReadonlyArray<{
+
readonly artists: any | null | undefined;
+
readonly count: number;
+
}>;
+
};
+
export type ProfileTopArtistsQuery = {
+
response: ProfileTopArtistsQuery$data;
+
variables: ProfileTopArtistsQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
+
v1 = [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "artists"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 50
+
},
+
{
+
"kind": "Literal",
+
"name": "orderBy",
+
"value": {
+
"count": "desc"
+
}
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artists",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
];
+
return {
+
"fragment": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "ProfileTopArtistsQuery",
+
"selections": (v1/*: any*/),
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Operation",
+
"name": "ProfileTopArtistsQuery",
+
"selections": (v1/*: any*/)
+
},
+
"params": {
+
"cacheID": "99a68c4a41531b275e40b1f9d2ef2d85",
+
"id": null,
+
"metadata": {},
+
"name": "ProfileTopArtistsQuery",
+
"operationKind": "query",
+
"text": "query ProfileTopArtistsQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: artists}], orderBy: {count: desc}, limit: 50, where: $where) {\n artists\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "3b52f52c3db6609a5a0e18a79018dc9e";
+
+
export default node;
+190
src/__generated__/ProfileTopTracksQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<61cded348d713dac6a8c3871906a3d5c>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type ProfileTopTracksQuery$variables = {
+
where?: FmTealAlphaFeedPlayWhereInput | null | undefined;
+
};
+
export type ProfileTopTracksQuery$data = {
+
readonly fmTealAlphaFeedPlaysAggregated: ReadonlyArray<{
+
readonly artists: any | null | undefined;
+
readonly count: number;
+
readonly releaseMbId: any | null | undefined;
+
readonly trackName: any | null | undefined;
+
}>;
+
};
+
export type ProfileTopTracksQuery = {
+
response: ProfileTopTracksQuery$data;
+
variables: ProfileTopTracksQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
+
v1 = [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "trackName"
+
},
+
{
+
"field": "releaseMbId"
+
},
+
{
+
"field": "artists"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 10
+
},
+
{
+
"kind": "Literal",
+
"name": "orderBy",
+
"value": {
+
"count": "desc"
+
}
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "trackName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "releaseMbId",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artists",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
];
+
return {
+
"fragment": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "ProfileTopTracksQuery",
+
"selections": (v1/*: any*/),
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Operation",
+
"name": "ProfileTopTracksQuery",
+
"selections": (v1/*: any*/)
+
},
+
"params": {
+
"cacheID": "570221126c225955de88bb1dd21c9d9e",
+
"id": null,
+
"metadata": {},
+
"name": "ProfileTopTracksQuery",
+
"operationKind": "query",
+
"text": "query ProfileTopTracksQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: trackName}, {field: releaseMbId}, {field: artists}], orderBy: {count: desc}, limit: 10, where: $where) {\n trackName\n releaseMbId\n artists\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "459f108ce53bf13ea9548756bb6698d5";
+
+
export default node;
+2 -66
src/__generated__/Profile_plays.graphql.ts
···
/**
-
* @generated SignedSource<<9b9347661ace6bcbeb677e53e4b5feec>>
+
* @generated SignedSource<<99fde612f90ee1d1dad1825b7b3b5f56>>
* @lightSyntaxTransform
* @nogrep
*/
···
readonly fmTealAlphaFeedPlays: {
readonly edges: ReadonlyArray<{
readonly node: {
-
readonly actorHandle: string | null | undefined;
-
readonly appBskyActorProfile: {
-
readonly avatar: {
-
readonly url: string;
-
} | null | undefined;
-
readonly description: string | null | undefined;
-
readonly displayName: string | null | undefined;
-
} | null | undefined;
readonly " $fragmentSpreads": FragmentRefs<"TrackItem_play">;
};
}>;
···
"alias": null,
"args": null,
"kind": "ScalarField",
-
"name": "actorHandle",
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"concreteType": "AppBskyActorProfile",
-
"kind": "LinkedField",
-
"name": "appBskyActorProfile",
-
"plural": false,
-
"selections": [
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "displayName",
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "description",
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"concreteType": "Blob",
-
"kind": "LinkedField",
-
"name": "avatar",
-
"plural": false,
-
"selections": [
-
{
-
"alias": null,
-
"args": [
-
{
-
"kind": "Literal",
-
"name": "preset",
-
"value": "avatar"
-
}
-
],
-
"kind": "ScalarField",
-
"name": "url",
-
"storageKey": "url(preset:\"avatar\")"
-
}
-
],
-
"storageKey": null
-
}
-
],
-
"storageKey": null
-
},
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
}
···
};
})();
-
(node as any).hash = "fb9d67e8cd94c4191b9956225ff78bdf";
+
(node as any).hash = "42b3df3f8d988503f2b08000f01b4c83";
export default node;
+5 -1
src/__generated__/TopAlbumsQuery.graphql.ts
···
/**
-
* @generated SignedSource<<ba0a977fd251b8099185f84ffca5fe7f>>
+
* @generated SignedSource<<5b4069c82e72c33b75aaff1d16f1421f>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { ConcreteRequest } from 'relay-runtime';
export type FmTealAlphaFeedPlayWhereInput = {
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
artistMbIds?: StringFilter | null | undefined;
artistNames?: StringFilter | null | undefined;
artists?: StringFilter | null | undefined;
···
duration?: IntFilter | null | undefined;
indexedAt?: DateTimeFilter | null | undefined;
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
originUrl?: StringFilter | null | undefined;
playedTime?: StringFilter | null | undefined;
recordingMbId?: StringFilter | null | undefined;
···
export type StringFilter = {
contains?: string | null | undefined;
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
gt?: string | null | undefined;
gte?: string | null | undefined;
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+168
src/__generated__/TopArtistsQuery.graphql.ts
···
+
/**
+
* @generated SignedSource<<f99e80895febe87f37e531bc257ce798>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ConcreteRequest } from 'relay-runtime';
+
export type FmTealAlphaFeedPlayWhereInput = {
+
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
artistMbIds?: StringFilter | null | undefined;
+
artistNames?: StringFilter | null | undefined;
+
artists?: StringFilter | null | undefined;
+
cid?: StringFilter | null | undefined;
+
collection?: StringFilter | null | undefined;
+
did?: StringFilter | null | undefined;
+
duration?: IntFilter | null | undefined;
+
indexedAt?: DateTimeFilter | null | undefined;
+
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
+
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
+
originUrl?: StringFilter | null | undefined;
+
playedTime?: StringFilter | null | undefined;
+
recordingMbId?: StringFilter | null | undefined;
+
releaseMbId?: StringFilter | null | undefined;
+
releaseName?: StringFilter | null | undefined;
+
submissionClientAgent?: StringFilter | null | undefined;
+
trackMbId?: StringFilter | null | undefined;
+
trackName?: StringFilter | null | undefined;
+
uri?: StringFilter | null | undefined;
+
};
+
export type DateTimeFilter = {
+
eq?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type StringFilter = {
+
contains?: string | null | undefined;
+
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
+
gt?: string | null | undefined;
+
gte?: string | null | undefined;
+
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+
lt?: string | null | undefined;
+
lte?: string | null | undefined;
+
};
+
export type IntFilter = {
+
eq?: number | null | undefined;
+
gt?: number | null | undefined;
+
gte?: number | null | undefined;
+
in?: ReadonlyArray<number | null | undefined> | null | undefined;
+
lt?: number | null | undefined;
+
lte?: number | null | undefined;
+
};
+
export type TopArtistsQuery$variables = {
+
where?: FmTealAlphaFeedPlayWhereInput | null | undefined;
+
};
+
export type TopArtistsQuery$data = {
+
readonly fmTealAlphaFeedPlaysAggregated: ReadonlyArray<{
+
readonly artists: any | null | undefined;
+
readonly count: number;
+
}>;
+
};
+
export type TopArtistsQuery = {
+
response: TopArtistsQuery$data;
+
variables: TopArtistsQuery$variables;
+
};
+
+
const node: ConcreteRequest = (function(){
+
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "where"
+
}
+
],
+
v1 = [
+
{
+
"alias": null,
+
"args": [
+
{
+
"kind": "Literal",
+
"name": "groupBy",
+
"value": [
+
{
+
"field": "artists"
+
}
+
]
+
},
+
{
+
"kind": "Literal",
+
"name": "limit",
+
"value": 50
+
},
+
{
+
"kind": "Literal",
+
"name": "orderBy",
+
"value": {
+
"count": "desc"
+
}
+
},
+
{
+
"kind": "Variable",
+
"name": "where",
+
"variableName": "where"
+
}
+
],
+
"concreteType": "FmTealAlphaFeedPlayAggregated",
+
"kind": "LinkedField",
+
"name": "fmTealAlphaFeedPlaysAggregated",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artists",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
+
}
+
];
+
return {
+
"fragment": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "TopArtistsQuery",
+
"selections": (v1/*: any*/),
+
"type": "Query",
+
"abstractKey": null
+
},
+
"kind": "Request",
+
"operation": {
+
"argumentDefinitions": (v0/*: any*/),
+
"kind": "Operation",
+
"name": "TopArtistsQuery",
+
"selections": (v1/*: any*/)
+
},
+
"params": {
+
"cacheID": "2fa8fb4ebdb5d17d362eecc3da9bbcbf",
+
"id": null,
+
"metadata": {},
+
"name": "TopArtistsQuery",
+
"operationKind": "query",
+
"text": "query TopArtistsQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: artists}], orderBy: {count: desc}, limit: 50, where: $where) {\n artists\n count\n }\n}\n"
+
}
+
};
+
})();
+
+
(node as any).hash = "ca44425203547633e6fb13b8f49c5619";
+
+
export default node;
+5 -1
src/__generated__/TopTracksQuery.graphql.ts
···
/**
-
* @generated SignedSource<<d82ad2bc23a12ef33ba6bce1df9620f3>>
+
* @generated SignedSource<<28bfcfbaf324e20bbfc524afcc9ed549>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { ConcreteRequest } from 'relay-runtime';
export type FmTealAlphaFeedPlayWhereInput = {
actorHandle?: StringFilter | null | undefined;
+
and?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
artistMbIds?: StringFilter | null | undefined;
artistNames?: StringFilter | null | undefined;
artists?: StringFilter | null | undefined;
···
duration?: IntFilter | null | undefined;
indexedAt?: DateTimeFilter | null | undefined;
isrc?: StringFilter | null | undefined;
+
json?: StringFilter | null | undefined;
musicServiceBaseDomain?: StringFilter | null | undefined;
+
or?: ReadonlyArray<FmTealAlphaFeedPlayWhereInput | null | undefined> | null | undefined;
originUrl?: StringFilter | null | undefined;
playedTime?: StringFilter | null | undefined;
recordingMbId?: StringFilter | null | undefined;
···
export type StringFilter = {
contains?: string | null | undefined;
eq?: string | null | undefined;
+
fuzzy?: string | null | undefined;
gt?: string | null | undefined;
gte?: string | null | undefined;
in?: ReadonlyArray<string | null | undefined> | null | undefined;
+25 -4
src/__generated__/TrackItem_play.graphql.ts
···
/**
-
* @generated SignedSource<<8d4b2dad137cc86578e0230225cde09f>>
+
* @generated SignedSource<<b5b4d3bdca427eb13381e978bf98d7b9>>
* @lightSyntaxTransform
* @nogrep
*/
···
readonly appBskyActorProfile: {
readonly displayName: string | null | undefined;
} | null | undefined;
-
readonly artists: any | null | undefined;
+
readonly artists: ReadonlyArray<{
+
readonly artistMbId: string | null | undefined;
+
readonly artistName: string | null | undefined;
+
} | null | undefined> | null | undefined;
readonly musicServiceBaseDomain: string | null | undefined;
readonly playedTime: string | null | undefined;
readonly releaseMbId: string | null | undefined;
···
{
"alias": null,
"args": null,
-
"kind": "ScalarField",
+
"concreteType": "FmTealAlphaFeedDefsArtist",
+
"kind": "LinkedField",
"name": "artists",
+
"plural": true,
+
"selections": [
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistName",
+
"storageKey": null
+
},
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "artistMbId",
+
"storageKey": null
+
}
+
],
"storageKey": null
},
{
···
"abstractKey": null
};
-
(node as any).hash = "ff1bb5f1d370a2aa9ee45a6db4320f83";
+
(node as any).hash = "9a70dada54e50e27bdd19183f1b16e35";
export default node;
+29 -9
src/main.tsx
···
import { StrictMode, Suspense } from "react";
import { createRoot } from "react-dom/client";
-
import { BrowserRouter, Routes, Route } from "react-router-dom";
+
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import "./index.css";
import App from "./App.tsx";
import Profile from "./Profile.tsx";
···
import { RelayEnvironmentProvider } from "react-relay";
import {
Environment,
-
Network,
type FetchFunction,
+
type GraphQLResponse,
+
Network,
Observable,
type SubscribeFunction,
-
type GraphQLResponse,
} from "relay-runtime";
import { createClient } from "graphql-ws";
+
import Overall from "./Overall.tsx";
+
import ProfileTopArtists from "./ProfileTopArtists.tsx";
+
import ProfileTopAlbums from "./ProfileTopAlbums.tsx";
+
import ProfileTopTracks from "./ProfileTopTracks.tsx";
+
import TopArtists from "./TopArtists.tsx";
const HTTP_ENDPOINT =
-
"http://localhost:3000/graphql?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a";
+
"https://api.slices.network/graphql?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26";
const WS_ENDPOINT =
-
"ws://localhost:3000/graphql/ws?slice=at://did:plc:fpruhuo22xkm5o7ttr2ktxdo/network.slices.slice/3m257yljpbg2a";
+
"wss://api.slices.network/graphql/ws?slice=at://did:plc:n2sgrmrxjell7f5oa5ruwlyl/network.slices.slice/3m5d5dfs3oy26";
const fetchGraphQL: FetchFunction = async (request, variables) => {
const resp = await fetch(HTTP_ENDPOINT, {
···
sink.error(error);
} else if (error instanceof CloseEvent) {
sink.error(
-
new Error(`WebSocket closed: ${error.code} ${error.reason}`)
+
new Error(`WebSocket closed: ${error.code} ${error.reason}`),
);
} else {
sink.error(new Error(JSON.stringify(error)));
}
},
complete: () => sink.complete(),
-
}
+
},
);
});
};
···
<Suspense fallback={<LoadingFallback />}>
<Routes>
<Route path="/" element={<App />} />
+
<Route path="/artists" element={<TopArtists />} />
+
<Route path="/artists/:period" element={<TopArtists />} />
<Route path="/tracks" element={<TopTracks />} />
<Route path="/tracks/:period" element={<TopTracks />} />
<Route path="/albums" element={<TopAlbums />} />
<Route path="/albums/:period" element={<TopAlbums />} />
-
<Route path="/profile/:handle" element={<Profile />} />
+
<Route
+
path="/profile/:handle"
+
element={<Navigate to="scrobbles" replace />}
+
/>
+
<Route path="/profile/:handle/scrobbles" element={<Profile />} />
+
<Route path="/profile/:handle/overall" element={<Overall />}>
+
<Route index element={<Navigate to="artists" replace />} />
+
<Route path="artists" element={<ProfileTopArtists />} />
+
<Route path="artists/:period" element={<ProfileTopArtists />} />
+
<Route path="albums" element={<ProfileTopAlbums />} />
+
<Route path="albums/:period" element={<ProfileTopAlbums />} />
+
<Route path="tracks" element={<ProfileTopTracks />} />
+
<Route path="tracks/:period" element={<ProfileTopTracks />} />
+
</Route>
</Routes>
</Suspense>
</RelayEnvironmentProvider>
</BrowserRouter>
-
</StrictMode>
+
</StrictMode>,
);