Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion client/src/api/albumDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const ALBUM_DETAIL = graphql(`
comment
createdAt
user {
id
displayName
}
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type CachedCrate = {
// InMemoryCache stores server results and shares album records by their IDs.
export const cache = new InMemoryCache({
typePolicies: {
// Public User objects intentionally omit the internal identity UUID.
User: { merge: true },
Query: {
fields: {
// Each response is the complete recent list, including [] after clear.
Expand Down
6 changes: 3 additions & 3 deletions client/src/generated/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
*/
type Documents = {
"\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n id\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": typeof types.AlbumDetailDocument,
"\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": typeof types.AlbumDetailDocument,
"\n mutation AddToCrate($albumId: ID!) {\n addToCrate(albumId: $albumId) {\n item {\n id\n }\n album {\n id\n isInCrate\n }\n }\n }\n": typeof types.AddToCrateDocument,
"\n mutation RemoveFromCrate($albumId: ID!) {\n removeFromCrate(albumId: $albumId) {\n removedAlbumId\n album {\n id\n isInCrate\n }\n }\n }\n": typeof types.RemoveFromCrateDocument,
"\n query MyCrate($first: Int!, $after: String) {\n myCrate(first: $first, after: $after) {\n edges {\n cursor\n node {\n id\n addedAt\n album {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n averageRating\n reviewCount\n isInCrate\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n totalCount\n }\n }\n": typeof types.MyCrateDocument,
Expand All @@ -26,7 +26,7 @@ type Documents = {
"\n mutation ClearSearchHistory {\n clearSearchHistory\n }\n": typeof types.ClearSearchHistoryDocument,
};
const documents: Documents = {
"\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n id\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": types.AlbumDetailDocument,
"\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n": types.AlbumDetailDocument,
"\n mutation AddToCrate($albumId: ID!) {\n addToCrate(albumId: $albumId) {\n item {\n id\n }\n album {\n id\n isInCrate\n }\n }\n }\n": types.AddToCrateDocument,
"\n mutation RemoveFromCrate($albumId: ID!) {\n removeFromCrate(albumId: $albumId) {\n removedAlbumId\n album {\n id\n isInCrate\n }\n }\n }\n": types.RemoveFromCrateDocument,
"\n query MyCrate($first: Int!, $after: String) {\n myCrate(first: $first, after: $after) {\n edges {\n cursor\n node {\n id\n addedAt\n album {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n averageRating\n reviewCount\n isInCrate\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n totalCount\n }\n }\n": types.MyCrateDocument,
Expand Down Expand Up @@ -55,7 +55,7 @@ export function graphql(source: string): unknown;
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n id\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"): (typeof documents)["\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n id\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"];
export function graphql(source: "\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"): (typeof documents)["\n query AlbumDetail($id: ID!, $reviewFirst: Int!, $reviewAfter: String) {\n album(id: $id) {\n id\n title\n releaseYear\n musicBrainzReleaseGroupId\n artists {\n id\n name\n }\n genres {\n id\n name\n }\n tracks {\n id\n title\n trackNumber\n durationSeconds\n }\n averageRating\n reviewCount\n isInCrate\n myReview {\n id\n rating\n comment\n }\n reviews(first: $reviewFirst, after: $reviewAfter) {\n edges {\n cursor\n node {\n id\n rating\n comment\n createdAt\n user {\n displayName\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
Loading