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",
+587 -55
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!]!
···
pinnedPost
}
+
input AppBskyActorProfileGroupByFieldInput {
+
field: AppBskyActorProfileGroupByField!
+
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
+
}
+
input AppBskyActorProfileWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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 {
···
external
}
+
input AppBskyEmbedExternalGroupByFieldInput {
+
field: AppBskyEmbedExternalGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyEmbedExternalInput {
+
external: JSON!
+
}
+
+
input AppBskyEmbedExternalSortFieldInput {
+
field: AppBskyEmbedExternalGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyEmbedExternalWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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!
···
enum AppBskyEmbedImagesGroupByField {
indexedAt
images
+
}
+
+
input AppBskyEmbedImagesGroupByFieldInput {
+
field: AppBskyEmbedImagesGroupByField!
+
interval: DateInterval
+
}
+
+
type AppBskyEmbedImagesImage {
+
alt: String
+
aspectRatio: JSON
+
image: Blob
+
}
+
+
input AppBskyEmbedImagesInput {
+
images: JSON!
+
}
+
+
input AppBskyEmbedImagesSortFieldInput {
+
field: AppBskyEmbedImagesGroupByField!
+
direction: SortDirection
}
input AppBskyEmbedImagesWhereInput {
···
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 {
···
record
}
+
input AppBskyEmbedRecordGroupByFieldInput {
+
field: AppBskyEmbedRecordGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyEmbedRecordInput {
+
record: JSON!
+
}
+
+
input AppBskyEmbedRecordSortFieldInput {
+
field: AppBskyEmbedRecordGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyEmbedRecordWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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!
···
record
}
+
input AppBskyEmbedRecordWithMediaGroupByFieldInput {
+
field: AppBskyEmbedRecordWithMediaGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyEmbedRecordWithMediaInput {
+
media: JSON!
+
record: JSON!
+
}
+
+
input AppBskyEmbedRecordWithMediaSortFieldInput {
+
field: AppBskyEmbedRecordWithMediaGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyEmbedRecordWithMediaWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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
-
video: Blob!
+
aspectRatio: AppBskyEmbedDefsAspectRatio
+
captions: [AppBskyEmbedVideoCaption]
+
video: Blob
appBskyActorProfile: AppBskyActorProfile
appBskyFeedPostgates(limit: Int): [AppBskyFeedPostgate!]!
appBskyFeedPostgatesCount: Int!
···
count: Int!
}
+
type AppBskyEmbedVideoCaption {
+
file: Blob
+
lang: String
+
}
+
type AppBskyEmbedVideoConnection {
totalCount: Int!
pageInfo: PageInfo!
···
video
}
+
input AppBskyEmbedVideoGroupByFieldInput {
+
field: AppBskyEmbedVideoGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyEmbedVideoInput {
+
alt: String
+
aspectRatio: JSON
+
captions: JSON
+
video: JSON!
+
}
+
+
input AppBskyEmbedVideoSortFieldInput {
+
field: AppBskyEmbedVideoGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyEmbedVideoWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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
···
post
}
+
input AppBskyFeedPostgateGroupByFieldInput {
+
field: AppBskyFeedPostgateGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyFeedPostgateInput {
+
createdAt: String!
+
detachedEmbeddingUris: [String]
+
embeddingRules: JSON
+
post: String!
+
}
+
+
input AppBskyFeedPostgateSortFieldInput {
+
field: AppBskyFeedPostgateGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyFeedPostgateWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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!]!
···
post
}
+
input AppBskyFeedThreadgateGroupByFieldInput {
+
field: AppBskyFeedThreadgateGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyFeedThreadgateInput {
+
allow: JSON
+
createdAt: String!
+
hiddenReplies: [String]
+
post: String!
+
}
+
+
input AppBskyFeedThreadgateSortFieldInput {
+
field: AppBskyFeedThreadgateGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyFeedThreadgateWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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!
···
index
}
+
input AppBskyRichtextFacetGroupByFieldInput {
+
field: AppBskyRichtextFacetGroupByField!
+
interval: DateInterval
+
}
+
+
input AppBskyRichtextFacetInput {
+
features: JSON!
+
index: JSON!
+
}
+
+
input AppBskyRichtextFacetSortFieldInput {
+
field: AppBskyRichtextFacetGroupByField!
+
direction: SortDirection
+
}
+
input AppBskyRichtextFacetWhereInput {
indexedAt: DateTimeFilter
uri: StringFilter
···
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
···
uri
}
+
input ComAtprotoRepoStrongRefGroupByFieldInput {
+
field: ComAtprotoRepoStrongRefGroupByField!
+
interval: DateInterval
+
}
+
+
input ComAtprotoRepoStrongRefInput {
+
cid: String!
+
uri: String!
+
}
+
+
input ComAtprotoRepoStrongRefSortFieldInput {
+
field: ComAtprotoRepoStrongRefGroupByField!
+
direction: SortDirection
+
}
+
input ComAtprotoRepoStrongRefWhereInput {
indexedAt: DateTimeFilter
did: StringFilter
···
actorHandle: StringFilter
cid: StringFilter
uri: StringFilter
+
json: StringFilter
+
and: [ComAtprotoRepoStrongRefWhereInput]
+
or: [ComAtprotoRepoStrongRefWhereInput]
+
}
+
+
enum DateInterval {
+
second
+
minute
+
hour
+
day
+
week
+
month
+
quarter
+
year
}
input DateTimeFilter {
···
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
···
submissionClientAgent
trackMbId
trackName
+
}
+
+
input FmTealAlphaFeedPlayGroupByFieldInput {
+
field: FmTealAlphaFeedPlayGroupByField!
+
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
}
input FmTealAlphaFeedPlayWhereInput {
···
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 {
···
type Query {
"""Query app.bsky.embed.record records"""
-
appBskyEmbedRecords(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyEmbedRecordWhereInput): AppBskyEmbedRecordConnection!
+
appBskyEmbedRecords(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedRecordSortFieldInput], where: AppBskyEmbedRecordWhereInput): AppBskyEmbedRecordConnection!
"""
Aggregated query for app.bsky.embed.record records with GROUP BY support
"""
-
appBskyEmbedRecordsAggregated(groupBy: [AppBskyEmbedRecordGroupByField!], where: AppBskyEmbedRecordWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordAggregated!]!
+
appBskyEmbedRecordsAggregated(groupBy: [AppBskyEmbedRecordGroupByFieldInput!], where: AppBskyEmbedRecordWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordAggregated!]!
"""Query app.bsky.embed.images records"""
-
appBskyEmbedImageses(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyEmbedImagesWhereInput): AppBskyEmbedImagesConnection!
+
appBskyEmbedImageses(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedImagesSortFieldInput], where: AppBskyEmbedImagesWhereInput): AppBskyEmbedImagesConnection!
"""
Aggregated query for app.bsky.embed.images records with GROUP BY support
"""
-
appBskyEmbedImagesesAggregated(groupBy: [AppBskyEmbedImagesGroupByField!], where: AppBskyEmbedImagesWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedImagesAggregated!]!
+
appBskyEmbedImagesesAggregated(groupBy: [AppBskyEmbedImagesGroupByFieldInput!], where: AppBskyEmbedImagesWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedImagesAggregated!]!
-
"""Query app.bsky.embed.video records"""
-
appBskyEmbedVideos(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyEmbedVideoWhereInput): AppBskyEmbedVideoConnection!
+
"""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.video records with GROUP BY support
+
Aggregated query for app.bsky.embed.recordWithMedia records with GROUP BY support
"""
-
appBskyEmbedVideosAggregated(groupBy: [AppBskyEmbedVideoGroupByField!], where: AppBskyEmbedVideoWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedVideoAggregated!]!
+
appBskyEmbedRecordWithMediasAggregated(groupBy: [AppBskyEmbedRecordWithMediaGroupByFieldInput!], where: AppBskyEmbedRecordWithMediaWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordWithMediaAggregated!]!
-
"""Query app.bsky.embed.recordWithMedia records"""
-
appBskyEmbedRecordWithMedias(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyEmbedRecordWithMediaWhereInput): AppBskyEmbedRecordWithMediaConnection!
+
"""Query app.bsky.embed.video records"""
+
appBskyEmbedVideos(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedVideoSortFieldInput], where: AppBskyEmbedVideoWhereInput): AppBskyEmbedVideoConnection!
"""
-
Aggregated query for app.bsky.embed.recordWithMedia records with GROUP BY support
+
Aggregated query for app.bsky.embed.video records with GROUP BY support
"""
-
appBskyEmbedRecordWithMediasAggregated(groupBy: [AppBskyEmbedRecordWithMediaGroupByField!], where: AppBskyEmbedRecordWithMediaWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedRecordWithMediaAggregated!]!
+
appBskyEmbedVideosAggregated(groupBy: [AppBskyEmbedVideoGroupByFieldInput!], where: AppBskyEmbedVideoWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedVideoAggregated!]!
"""Query app.bsky.embed.external records"""
-
appBskyEmbedExternals(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyEmbedExternalWhereInput): AppBskyEmbedExternalConnection!
+
appBskyEmbedExternals(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyEmbedExternalSortFieldInput], where: AppBskyEmbedExternalWhereInput): AppBskyEmbedExternalConnection!
"""
Aggregated query for app.bsky.embed.external records with GROUP BY support
"""
-
appBskyEmbedExternalsAggregated(groupBy: [AppBskyEmbedExternalGroupByField!], where: AppBskyEmbedExternalWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedExternalAggregated!]!
+
appBskyEmbedExternalsAggregated(groupBy: [AppBskyEmbedExternalGroupByFieldInput!], where: AppBskyEmbedExternalWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyEmbedExternalAggregated!]!
"""Query app.bsky.feed.postgate records"""
-
appBskyFeedPostgates(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyFeedPostgateWhereInput): AppBskyFeedPostgateConnection!
+
appBskyFeedPostgates(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyFeedPostgateSortFieldInput], where: AppBskyFeedPostgateWhereInput): AppBskyFeedPostgateConnection!
"""
Aggregated query for app.bsky.feed.postgate records with GROUP BY support
"""
-
appBskyFeedPostgatesAggregated(groupBy: [AppBskyFeedPostgateGroupByField!], where: AppBskyFeedPostgateWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyFeedPostgateAggregated!]!
+
appBskyFeedPostgatesAggregated(groupBy: [AppBskyFeedPostgateGroupByFieldInput!], where: AppBskyFeedPostgateWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyFeedPostgateAggregated!]!
"""Query app.bsky.feed.threadgate records"""
-
appBskyFeedThreadgates(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyFeedThreadgateWhereInput): AppBskyFeedThreadgateConnection!
+
appBskyFeedThreadgates(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyFeedThreadgateSortFieldInput], where: AppBskyFeedThreadgateWhereInput): AppBskyFeedThreadgateConnection!
"""
Aggregated query for app.bsky.feed.threadgate records with GROUP BY support
"""
-
appBskyFeedThreadgatesAggregated(groupBy: [AppBskyFeedThreadgateGroupByField!], where: AppBskyFeedThreadgateWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyFeedThreadgateAggregated!]!
+
appBskyFeedThreadgatesAggregated(groupBy: [AppBskyFeedThreadgateGroupByFieldInput!], where: AppBskyFeedThreadgateWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyFeedThreadgateAggregated!]!
"""Query app.bsky.richtext.facet records"""
-
appBskyRichtextFacets(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyRichtextFacetWhereInput): AppBskyRichtextFacetConnection!
+
appBskyRichtextFacets(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyRichtextFacetSortFieldInput], where: AppBskyRichtextFacetWhereInput): AppBskyRichtextFacetConnection!
"""
Aggregated query for app.bsky.richtext.facet records with GROUP BY support
"""
-
appBskyRichtextFacetsAggregated(groupBy: [AppBskyRichtextFacetGroupByField!], where: AppBskyRichtextFacetWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyRichtextFacetAggregated!]!
+
appBskyRichtextFacetsAggregated(groupBy: [AppBskyRichtextFacetGroupByFieldInput!], where: AppBskyRichtextFacetWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyRichtextFacetAggregated!]!
"""Query app.bsky.actor.profile records"""
-
appBskyActorProfiles(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: AppBskyActorProfileWhereInput): AppBskyActorProfileConnection!
+
appBskyActorProfiles(first: Int, after: String, last: Int, before: String, sortBy: [AppBskyActorProfileSortFieldInput], where: AppBskyActorProfileWhereInput): AppBskyActorProfileConnection!
"""
Aggregated query for app.bsky.actor.profile records with GROUP BY support
"""
-
appBskyActorProfilesAggregated(groupBy: [AppBskyActorProfileGroupByField!], where: AppBskyActorProfileWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyActorProfileAggregated!]!
+
appBskyActorProfilesAggregated(groupBy: [AppBskyActorProfileGroupByFieldInput!], where: AppBskyActorProfileWhereInput, orderBy: AggregationOrderBy, limit: Int): [AppBskyActorProfileAggregated!]!
"""Query com.atproto.repo.strongRef records"""
-
comAtprotoRepoStrongRefs(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: ComAtprotoRepoStrongRefWhereInput): ComAtprotoRepoStrongRefConnection!
+
comAtprotoRepoStrongRefs(first: Int, after: String, last: Int, before: String, sortBy: [ComAtprotoRepoStrongRefSortFieldInput], where: ComAtprotoRepoStrongRefWhereInput): ComAtprotoRepoStrongRefConnection!
"""
Aggregated query for com.atproto.repo.strongRef records with GROUP BY support
"""
-
comAtprotoRepoStrongRefsAggregated(groupBy: [ComAtprotoRepoStrongRefGroupByField!], where: ComAtprotoRepoStrongRefWhereInput, orderBy: AggregationOrderBy, limit: Int): [ComAtprotoRepoStrongRefAggregated!]!
+
comAtprotoRepoStrongRefsAggregated(groupBy: [ComAtprotoRepoStrongRefGroupByFieldInput!], where: ComAtprotoRepoStrongRefWhereInput, orderBy: AggregationOrderBy, limit: Int): [ComAtprotoRepoStrongRefAggregated!]!
"""Query fm.teal.alpha.feed.play records"""
-
fmTealAlphaFeedPlays(first: Int, after: String, last: Int, before: String, sortBy: [SortField], where: FmTealAlphaFeedPlayWhereInput): FmTealAlphaFeedPlayConnection!
+
fmTealAlphaFeedPlays(first: Int, after: String, last: Int, before: String, sortBy: [FmTealAlphaFeedPlaySortFieldInput], where: FmTealAlphaFeedPlayWhereInput): FmTealAlphaFeedPlayConnection!
"""
Aggregated query for fm.teal.alpha.feed.play records with GROUP BY support
"""
-
fmTealAlphaFeedPlaysAggregated(groupBy: [FmTealAlphaFeedPlayGroupByField!], where: FmTealAlphaFeedPlayWhereInput, orderBy: AggregationOrderBy, limit: Int): [FmTealAlphaFeedPlayAggregated!]!
+
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
}
-
input SortField {
-
field: String!
-
direction: SortDirection!
+
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!]!
+
}
+
+34 -5
src/App.tsx
···
usePaginationFragment,
useSubscription,
} from "react-relay";
-
import { useEffect, useRef } from "react";
+
import { useEffect, useRef, useMemo } from "react";
import type { AppQuery } from "./__generated__/AppQuery.graphql";
import type { App_plays$key } from "./__generated__/App_plays.graphql";
import type { AppSubscription } from "./__generated__/AppSubscription.graphql";
import TrackItem from "./TrackItem";
import Layout from "./Layout";
+
import ScrobbleChart from "./ScrobbleChart";
import {
ConnectionHandler,
type GraphQLSubscriptionConfig,
} from "relay-runtime";
export default function App() {
+
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 {
+
chartWhere: {
+
playedTime: {
+
gte: ninetyDaysAgo.toISOString(),
+
},
+
},
+
};
+
}, []);
+
const queryData = useLazyLoadQuery<AppQuery>(
graphql`
-
query AppQuery {
+
query AppQuery($chartWhere: FmTealAlphaFeedPlayWhereInput!) {
...App_plays
+
...ScrobbleChart_data
}
`,
-
{}
+
queryVariables
);
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment<
···
fmTealAlphaFeedPlays(
first: $count
after: $cursor
-
sortBy: [{ field: "playedTime", direction: desc }]
+
sortBy: [{ field: playedTime, direction: desc }]
) @connection(key: "App_fmTealAlphaFeedPlays", filters: ["sortBy"]) {
totalCount
edges {
···
updater: (store) => {
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(
···
});
return (
-
<Layout>
+
<Layout headerChart={<ScrobbleChart queryRef={queryData} />}>
<div className="mb-8">
<p className="text-xs text-zinc-500 uppercase tracking-wider">
{data?.fmTealAlphaFeedPlays?.totalCount?.toLocaleString()} scrobbles
+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>
+
);
+
}
+9 -3
src/Layout.tsx
···
interface LayoutProps {
children: React.ReactNode;
+
headerChart?: React.ReactNode;
}
-
export default function Layout({ children }: LayoutProps) {
+
export default function Layout({ children, headerChart }: LayoutProps) {
const location = useLocation();
const isTracksPage = location.pathname.startsWith("/tracks");
const isAlbumsPage = location.pathname.startsWith("/albums");
···
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">
-
<div className="mb-4 border-b border-zinc-800 pb-4">
-
<div className="flex items-end justify-between">
+
<div className="mb-4 border-b border-zinc-800 pb-4 relative">
+
{headerChart && (
+
<div className="absolute inset-0 pointer-events-none opacity-40">
+
{headerChart}
+
</div>
+
)}
+
<div className="flex items-end justify-between relative">
<div>
<h1 className="text-xs font-medium uppercase tracking-wider text-zinc-500">Listening History</h1>
<p className="text-xs text-zinc-600 mt-1">fm.teal.alpha.feed.play</p>
+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>
+
);
+
}
+49 -66
src/Profile.tsx
···
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay";
-
import { useParams, Link } from "react-router-dom";
-
import { useEffect, useRef } 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 ProfileLayout from "./ProfileLayout";
export default function Profile() {
const { handle } = useParams<{ handle: string }>();
+
const queryVariables = useMemo(() => {
+
return {
+
where: { actorHandle: { eq: handle } },
+
};
+
}, [handle]);
+
const queryData = useLazyLoadQuery<ProfileQueryType>(
graphql`
query ProfileQuery($where: FmTealAlphaFeedPlayWhereInput!) {
...Profile_plays @arguments(where: $where)
}
`,
-
{
-
where: { actorHandle: { eq: handle } },
-
}
+
queryVariables,
);
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment<
···
fmTealAlphaFeedPlays(
first: $count
after: $cursor
-
sortBy: [{ field: "playedTime", direction: desc }]
+
sortBy: [{ field: playedTime, direction: desc }]
where: $where
)
@connection(
···
edges {
node {
...TrackItem_play
-
actorHandle
-
appBskyActorProfile {
-
displayName
-
description
-
avatar {
-
url(preset: "avatar")
-
}
-
}
}
}
}
}
`,
-
queryData
+
queryData,
);
const loadMoreRef = useRef<HTMLDivElement>(null);
-
const plays = data?.fmTealAlphaFeedPlays?.edges?.map((edge) => edge.node).filter((n) => n != null) || [];
-
const profile = plays?.[0]?.appBskyActorProfile;
+
const plays = useMemo(
+
() =>
+
data?.fmTealAlphaFeedPlays?.edges?.map((edge) => edge.node).filter((n) =>
+
n != null
+
) || [],
+
[data?.fmTealAlphaFeedPlays?.edges],
+
);
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>
+
//@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-12 flex items-start gap-6 border-b border-zinc-800 pb-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 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>
+
);
+
}
+113
src/ScrobbleChart.tsx
···
+
import { graphql, useFragment } from "react-relay";
+
import { useMemo } from "react";
+
import type { ScrobbleChart_data$key } from "./__generated__/ScrobbleChart_data.graphql";
+
+
interface ScrobbleChartProps {
+
queryRef: ScrobbleChart_data$key;
+
}
+
+
export default function ScrobbleChart({ queryRef }: ScrobbleChartProps) {
+
const data = useFragment(
+
graphql`
+
fragment ScrobbleChart_data on Query {
+
chartData: fmTealAlphaFeedPlaysAggregated(
+
groupBy: [{ field: playedTime, interval: day }]
+
where: $chartWhere
+
limit: 90
+
) {
+
playedTime
+
count
+
}
+
}
+
`,
+
queryRef
+
);
+
+
const chartData = useMemo(() => {
+
if (!data?.chartData) return [];
+
+
// Convert aggregated data to chart format
+
const aggregated = data.chartData.map((item) => {
+
// playedTime comes back as '2025-08-03 00:00:00', extract just the date part
+
const date = item.playedTime ? item.playedTime.split(' ')[0] : "";
+
return {
+
date,
+
count: item.count,
+
};
+
}).sort((a, b) => a.date.localeCompare(b.date));
+
+
// Fill in missing days with zero counts
+
const now = new Date();
+
now.setHours(0, 0, 0, 0);
+
const filledData = [];
+
+
for (let i = 89; i >= 0; i--) {
+
const date = new Date(now);
+
date.setDate(date.getDate() - i);
+
const dateStr = date.toISOString().split("T")[0];
+
+
const existing = aggregated.find((d) => d.date === dateStr);
+
filledData.push({
+
date: dateStr,
+
count: existing ? existing.count : 0,
+
});
+
}
+
+
return filledData;
+
}, [data?.chartData]);
+
+
if (!chartData || chartData.length === 0) return null;
+
+
const width = 1000;
+
const height = 100;
+
const padding = { top: 0, right: 0, bottom: 0, left: 0 };
+
const chartWidth = width - padding.left - padding.right;
+
const chartHeight = height - padding.top - padding.bottom;
+
+
const maxCount = Math.max(...chartData.map((d) => d.count));
+
const minCount = Math.min(...chartData.map((d) => d.count));
+
const range = maxCount - minCount || 1;
+
+
// Generate points for the line
+
const points = chartData.map((d, i) => {
+
const x = padding.left + (i / (chartData.length - 1)) * chartWidth;
+
const y = padding.top + chartHeight - ((d.count - minCount) / range) * chartHeight;
+
return `${x},${y}`;
+
}).join(" ");
+
+
// Generate area path
+
const areaPoints = [
+
`${padding.left},${padding.top + chartHeight}`,
+
...chartData.map((d, i) => {
+
const x = padding.left + (i / (chartData.length - 1)) * chartWidth;
+
const y = padding.top + chartHeight - ((d.count - minCount) / range) * chartHeight;
+
return `${x},${y}`;
+
}),
+
`${padding.left + chartWidth},${padding.top + chartHeight}`,
+
].join(" ");
+
+
return (
+
<svg
+
viewBox={`0 0 ${width} ${height}`}
+
className="w-full h-full"
+
preserveAspectRatio="none"
+
>
+
{/* Area fill */}
+
<polygon
+
points={areaPoints}
+
fill="rgb(139 92 246 / 0.1)"
+
stroke="none"
+
/>
+
+
{/* Line */}
+
<polyline
+
points={points}
+
fill="none"
+
stroke="rgb(139 92 246)"
+
strokeWidth="1.5"
+
strokeLinecap="round"
+
strokeLinejoin="round"
+
/>
+
</svg>
+
);
+
}
+1 -1
src/TopAlbums.tsx
···
graphql`
query TopAlbumsQuery($where: FmTealAlphaFeedPlayWhereInput) {
fmTealAlphaFeedPlaysAggregated(
-
groupBy: [releaseMbId, releaseName, artists]
+
groupBy: [{ field: releaseMbId }, { field: releaseName }, { field: artists }]
orderBy: { count: desc }
limit: 100
where: $where
+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>
+
);
+
}
+2 -2
src/TopTracks.tsx
···
graphql`
query TopTracksQuery($where: FmTealAlphaFeedPlayWhereInput) {
fmTealAlphaFeedPlaysAggregated(
-
groupBy: [trackName, releaseMbId, artists]
+
groupBy: [{ field: trackName }, { field: releaseMbId }, { field: artists }]
orderBy: { count: desc }
limit: 50
where: $where
···
}
`,
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
+34 -7
src/__generated__/AppPaginationQuery.graphql.ts
···
/**
-
* @generated SignedSource<<93c3b304b5d8458925d44479b7dfa204>>
+
* @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": "71c3d1d480a2c2bc60d3b35d2f07d4eb",
+
"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"
}
};
})();
-
(node as any).hash = "0e4acf96fedae07af90ce6e9e3bf18d6";
+
(node as any).hash = "1e73fa97ccff20071e5a3fba0f00b48c";
export default node;
+152 -20
src/__generated__/AppQuery.graphql.ts
···
/**
-
* @generated SignedSource<<260fc65cac40538ad1a1673377c9e51d>>
+
* @generated SignedSource<<4eadb1b67651fecb72943df792f91938>>
* @lightSyntaxTransform
* @nogrep
*/
···
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
-
export type AppQuery$variables = Record<PropertyKey, never>;
+
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 AppQuery$variables = {
+
chartWhere: FmTealAlphaFeedPlayWhereInput;
+
};
export type AppQuery$data = {
-
readonly " $fragmentSpreads": FragmentRefs<"App_plays">;
+
readonly " $fragmentSpreads": FragmentRefs<"App_plays" | "ScrobbleChart_data">;
};
export type AppQuery = {
response: AppQuery$data;
···
const node: ConcreteRequest = (function(){
var v0 = [
+
{
+
"defaultValue": null,
+
"kind": "LocalArgument",
+
"name": "chartWhere"
+
}
+
],
+
v1 = [
{
"kind": "Literal",
"name": "first",
···
}
]
}
-
];
+
],
+
v2 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "playedTime",
+
"storageKey": null
+
},
+
v3 = {
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "id",
+
"storageKey": null
+
};
return {
"fragment": {
-
"argumentDefinitions": [],
+
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "AppQuery",
···
"args": null,
"kind": "FragmentSpread",
"name": "App_plays"
+
},
+
{
+
"args": null,
+
"kind": "FragmentSpread",
+
"name": "ScrobbleChart_data"
}
],
"type": "Query",
···
},
"kind": "Request",
"operation": {
-
"argumentDefinitions": [],
+
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "AppQuery",
"selections": [
{
"alias": null,
-
"args": (v0/*: any*/),
+
"args": (v1/*: any*/),
"concreteType": "FmTealAlphaFeedPlayConnection",
"kind": "LinkedField",
"name": "fmTealAlphaFeedPlays",
···
"name": "node",
"plural": false,
"selections": [
-
{
-
"alias": null,
-
"args": null,
-
"kind": "ScalarField",
-
"name": "playedTime",
-
"storageKey": null
-
},
+
(v2/*: any*/),
{
"alias": null,
"args": null,
···
{
"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,
···
},
{
"alias": null,
-
"args": (v0/*: any*/),
+
"args": (v1/*: any*/),
"filters": [
"sortBy"
],
···
"key": "App_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": [
+
(v2/*: any*/),
+
{
+
"alias": null,
+
"args": null,
+
"kind": "ScalarField",
+
"name": "count",
+
"storageKey": null
+
}
+
],
+
"storageKey": null
}
]
},
"params": {
-
"cacheID": "f3173a0a17eece6a35b00c37e787c484",
+
"cacheID": "ab3827e5716f65074a802ddb36f66d2b",
"id": null,
"metadata": {},
"name": "AppQuery",
"operationKind": "query",
-
"text": "query AppQuery {\n ...App_plays\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 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"
}
};
})();
-
(node as any).hash = "4b1837f6cd874e31461fbead77c1b012";
+
(node as any).hash = "7266612861cb55b740623549f1a03f26";
export default node;
+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"
}
};
})();
+2 -2
src/__generated__/App_plays.graphql.ts
···
/**
-
* @generated SignedSource<<a3ae5f31f618986fb12e6c57458c9853>>
+
* @generated SignedSource<<ba0bacb4e016f0edbea67013c8694b23>>
* @lightSyntaxTransform
* @nogrep
*/
···
};
})();
-
(node as any).hash = "0e4acf96fedae07af90ce6e9e3bf18d6";
+
(node as any).hash = "1e73fa97ccff20071e5a3fba0f00b48c";
export default node;
+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<<9824b6fa6724ec81721b89464e18ee4f>>
+
* @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": "6d52a3e02fe71c3ad54ec2006fc2ac45",
+
"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 = "86bf47e8cb24c938b0b5d7ad6f5cb916";
+
(node as any).hash = "42b3df3f8d988503f2b08000f01b4c83";
export default node;
+36 -36
src/__generated__/ProfileQuery.graphql.ts
···
/**
-
* @generated SignedSource<<0920331f4eccd3551cbc3ca8646596f0>>
+
* @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;
···
]
},
(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": "0592d86db07d88ab11657ea4cd107231",
+
"cacheID": "d7aed8545b8651ae55d39d275c14fc74",
"id": null,
"metadata": {},
"name": "ProfileQuery",
"operationKind": "query",
-
"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 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 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"
}
};
})();
+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<<0e69127350e3dc66273c2ea60929dc92>>
+
* @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 = "86bf47e8cb24c938b0b5d7ad6f5cb916";
+
(node as any).hash = "42b3df3f8d988503f2b08000f01b4c83";
export default node;
+89
src/__generated__/ScrobbleChart_data.graphql.ts
···
+
/**
+
* @generated SignedSource<<7b446f8950ffde63fb0e7748bb596e66>>
+
* @lightSyntaxTransform
+
* @nogrep
+
*/
+
+
/* tslint:disable */
+
/* eslint-disable */
+
// @ts-nocheck
+
+
import { ReaderFragment } from 'relay-runtime';
+
import { FragmentRefs } from "relay-runtime";
+
export type ScrobbleChart_data$data = {
+
readonly chartData: ReadonlyArray<{
+
readonly count: number;
+
readonly playedTime: any | null | undefined;
+
}>;
+
readonly " $fragmentType": "ScrobbleChart_data";
+
};
+
export type ScrobbleChart_data$key = {
+
readonly " $data"?: ScrobbleChart_data$data;
+
readonly " $fragmentSpreads": FragmentRefs<"ScrobbleChart_data">;
+
};
+
+
const node: ReaderFragment = {
+
"argumentDefinitions": [
+
{
+
"kind": "RootArgument",
+
"name": "chartWhere"
+
}
+
],
+
"kind": "Fragment",
+
"metadata": null,
+
"name": "ScrobbleChart_data",
+
"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
+
}
+
],
+
"type": "Query",
+
"abstractKey": null
+
};
+
+
(node as any).hash = "6d8ebfa533779947a0b3cd703929b5ba";
+
+
export default node;
+17 -7
src/__generated__/TopAlbumsQuery.graphql.ts
···
/**
-
* @generated SignedSource<<8cf8cec6835334168002a2939635c9d5>>
+
* @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;
···
"kind": "Literal",
"name": "groupBy",
"value": [
-
"releaseMbId",
-
"releaseName",
-
"artists"
+
{
+
"field": "releaseMbId"
+
},
+
{
+
"field": "releaseName"
+
},
+
{
+
"field": "artists"
+
}
]
},
{
···
"selections": (v1/*: any*/)
},
"params": {
-
"cacheID": "bb227295300710370e7e5c2492532c01",
+
"cacheID": "4bc742f9cab572a86f4956ae1325e650",
"id": null,
"metadata": {},
"name": "TopAlbumsQuery",
"operationKind": "query",
-
"text": "query TopAlbumsQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [releaseMbId, releaseName, artists], orderBy: {count: desc}, limit: 100, where: $where) {\n releaseMbId\n releaseName\n artists\n count\n }\n}\n"
+
"text": "query TopAlbumsQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: releaseMbId}, {field: releaseName}, {field: artists}], orderBy: {count: desc}, limit: 100, where: $where) {\n releaseMbId\n releaseName\n artists\n count\n }\n}\n"
}
};
})();
-
(node as any).hash = "6e30827615eb8acfde3c0c80598b6627";
+
(node as any).hash = "c916cfe287c6837e7b40f0712b123f12";
export default node;
+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;
+17 -7
src/__generated__/TopTracksQuery.graphql.ts
···
/**
-
* @generated SignedSource<<2c2f4cf7a049eff39002109dffd04288>>
+
* @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;
···
"kind": "Literal",
"name": "groupBy",
"value": [
-
"trackName",
-
"releaseMbId",
-
"artists"
+
{
+
"field": "trackName"
+
},
+
{
+
"field": "releaseMbId"
+
},
+
{
+
"field": "artists"
+
}
]
},
{
···
"selections": (v1/*: any*/)
},
"params": {
-
"cacheID": "cbf23694acc55e8dfbe9296500193932",
+
"cacheID": "d889d685b64fb19d468954bb3fb7ff7c",
"id": null,
"metadata": {},
"name": "TopTracksQuery",
"operationKind": "query",
-
"text": "query TopTracksQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [trackName, releaseMbId, artists], orderBy: {count: desc}, limit: 50, where: $where) {\n trackName\n releaseMbId\n artists\n count\n }\n}\n"
+
"text": "query TopTracksQuery(\n $where: FmTealAlphaFeedPlayWhereInput\n) {\n fmTealAlphaFeedPlaysAggregated(groupBy: [{field: trackName}, {field: releaseMbId}, {field: artists}], orderBy: {count: desc}, limit: 50, where: $where) {\n trackName\n releaseMbId\n artists\n count\n }\n}\n"
}
};
})();
-
(node as any).hash = "6b649e9c39df41d4ce995e69e6dc6f35";
+
(node as any).hash = "4b62eaeaf8a935abc28e77c8cd2907d1";
export default node;
+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;
+37
src/generateChartData.ts
···
+
export interface DataPoint {
+
date: string;
+
count: number;
+
}
+
+
export function generateChartData(
+
plays: readonly { readonly playedTime?: string | null; readonly [key: string]: any }[],
+
days = 90
+
): DataPoint[] {
+
const counts = new Map<string, number>();
+
const now = new Date();
+
+
// Initialize last N days with 0 counts
+
for (let i = days - 1; i >= 0; i--) {
+
const date = new Date(now);
+
date.setDate(date.getDate() - i);
+
date.setHours(0, 0, 0, 0);
+
const dateStr = date.toISOString().split("T")[0];
+
counts.set(dateStr, 0);
+
}
+
+
// Count plays per day
+
plays.forEach((play) => {
+
if (play?.playedTime) {
+
const date = new Date(play.playedTime);
+
date.setHours(0, 0, 0, 0);
+
const dateStr = date.toISOString().split("T")[0];
+
if (counts.has(dateStr)) {
+
counts.set(dateStr, (counts.get(dateStr) || 0) + 1);
+
}
+
}
+
});
+
+
return Array.from(counts.entries())
+
.map(([date, count]) => ({ date, count }))
+
.sort((a, b) => a.date.localeCompare(b.date));
+
}
+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>,
);