Skip to content

[PE-6156] Deprecate fetch collections #12148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 25, 2025

Conversation

dylanjeffers
Copy link
Contributor

Description

Deprecates fetch collections similar to tracks.

Comment on lines 14 to 28
export function* queryTrack(id: ID | null | undefined, forceRetrieve = false) {
if (!id) return null
const queryClient = yield* getContext('queryClient')
return queryClient.getQueryData(getTrackQueryKey(id))
const sdk = yield* getSDK()
const currentUserId = yield* select(getUserId)
const dispatch = yield* getContext('dispatch')

const queryData = yield* call([queryClient, queryClient.fetchQuery], {
queryKey: getTrackQueryKey(id),
queryFn: async () =>
getTrackQueryFn(id!, currentUserId, queryClient, sdk, dispatch),
staleTime: forceRetrieve ? 0 : undefined
})

return queryData as TQTrack | undefined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this stuff already on main?

Comment on lines +77 to +78
export const resetCollection = (): ResetCollectionAction => ({
type: RESET_COLLECTION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the context here?


const TRACKS_BATCH_LIMIT = 200

export function* retrieveTracksForCollections(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're moving this around can we rename it queryTracksForCollection

trackIds: allSavedTrackIds.filter((id) => id !== null)
})
const tracks = yield* call(
// @ts-ignore - Mobile for some reason fails to type-check this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

Copy link

changeset-bot bot commented May 25, 2025

⚠️ No Changeset found

Latest commit: d8fd751

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit ed9afdd into main May 25, 2025
4 of 5 checks passed
@dylanjeffers dylanjeffers deleted the pe-6156-deprecate-fetch-collections branch May 25, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants