From 95fd638aea05cad4a4eb1612422fec7c24c3c4d3 Mon Sep 17 00:00:00 2001 From: Matthew Zikherman Date: Tue, 1 Oct 2024 17:07:56 -0400 Subject: [PATCH] feat: remove collector profile update prompt activities from Notifications --- src/Components/Notifications/Notification.tsx | 7 - ...tificationCollectorProfileUpdatePrompt.tsx | 117 ----------- .../Notifications/NotificationItem.tsx | 187 ++++++++---------- ...cationItemCollectorProfileUpdatePrompt.tsx | 141 ------------- src/Components/Notifications/util.ts | 4 + ...rofileUpdatePrompt_notification.graphql.ts | 99 ---------- ...leUpdatePrompt_notificationItem.graphql.ts | 86 -------- .../NotificationItem_notification.graphql.ts | 20 +- .../NotificationItem_test_Query.graphql.ts | 140 ++++--------- .../NotificationQuery.graphql.ts | 105 +++------- .../NotificationsListNextQuery.graphql.ts | 61 +----- .../NotificationsListQuery.graphql.ts | 61 +----- .../NotificationsList_test_Query.graphql.ts | 126 ++++-------- 13 files changed, 215 insertions(+), 939 deletions(-) delete mode 100644 src/Components/Notifications/NotificationCollectorProfileUpdatePrompt.tsx delete mode 100644 src/Components/Notifications/NotificationItemCollectorProfileUpdatePrompt.tsx delete mode 100644 src/__generated__/NotificationCollectorProfileUpdatePrompt_notification.graphql.ts delete mode 100644 src/__generated__/NotificationItemCollectorProfileUpdatePrompt_notificationItem.graphql.ts diff --git a/src/Components/Notifications/Notification.tsx b/src/Components/Notifications/Notification.tsx index b74082bb05c..26776c5e06f 100644 --- a/src/Components/Notifications/Notification.tsx +++ b/src/Components/Notifications/Notification.tsx @@ -26,7 +26,6 @@ import createLogger from "Utils/logger" import { NotificationErrorMessage } from "Components/Notifications/NotificationErrorMessage" import { useClientQuery } from "Utils/Hooks/useClientQuery" import { PartnerShowOpenedNotification } from "Components/Notifications/PartnerShowOpenedNotification" -import { NotificationCollectorProfileUpdatePrompt } from "Components/Notifications/NotificationCollectorProfileUpdatePrompt" const logger = createLogger("NotificationItem") @@ -125,11 +124,6 @@ const Notification: React.FC = ({ notificationId }) => { case "VIEWING_ROOM_PUBLISHED": return - case "COLLECTOR_PROFILE_UPDATE_PROMPT": - return ( - - ) - default: return null } @@ -160,7 +154,6 @@ const notificationQuery = graphql` ...PartnerOfferCreatedNotification_notification ...PartnerShowOpenedNotification_notification ...ViewingRoomPublishedNotification_notification - ...NotificationCollectorProfileUpdatePrompt_notification id internalID notificationType diff --git a/src/Components/Notifications/NotificationCollectorProfileUpdatePrompt.tsx b/src/Components/Notifications/NotificationCollectorProfileUpdatePrompt.tsx deleted file mode 100644 index 954a8d5923e..00000000000 --- a/src/Components/Notifications/NotificationCollectorProfileUpdatePrompt.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { Box, Button, Image, ResponsiveBox, Stack, Text } from "@artsy/palette" -import { FC, useState } from "react" -import { graphql, useFragment } from "react-relay" -import { NotificationCollectorProfileUpdatePrompt_notification$key } from "__generated__/NotificationCollectorProfileUpdatePrompt_notification.graphql" -import { NOTIFICATION_MAX_WIDTH } from "Components/Notifications/Notification" -import { CompleteProfileCollectionDialog } from "Components/CompleteProfile/CompleteProfileCollectionDialog" -import { CompleteProfileInformationDialog } from "Components/CompleteProfile/CompleteProfileInformationDialog" -import { resized } from "Utils/resized" - -interface NotificationCollectorProfileUpdatePromptProps { - notification: NotificationCollectorProfileUpdatePrompt_notification$key -} - -const CONFIG = { - profile: { - title: "Tell us a little bit more about you.", - description: - "By completing your profile, you’re more likely to receive quick responses from galleries.", - label: "Complete Your Profile", - image: { - src: - "https://files.artsy.net/images/collector-profile_information_trimmed.jpg", - width: 1248, - height: 1525, - }, - }, - collection: { - title: "Tell us about the artists in your collection.", - description: "Show off your collection and make a great impression.", - label: "Add Artists to My Collection", - image: { - src: - "https://files.artsy.net/images/collector-profile_collection_trimmed.jpg", - width: 1248, - height: 1525, - }, - }, -} - -export const NotificationCollectorProfileUpdatePrompt: FC = ({ - notification: _notification, -}) => { - const notification = useFragment(FRAGMENT, _notification) - - const [mode, setMode] = useState<"Idle" | "Open">("Idle") - - const handleClose = () => { - setMode("Idle") - } - - const hasArtistsInCollection = - (notification.item?.me?.userInterestsConnection?.totalCount ?? 0) > 0 - - const config = hasArtistsInCollection ? CONFIG.profile : CONFIG.collection - const img = resized(config.image.src, { width: 450 }) - - return ( - <> - - - Artsy Message • Today - - - - - {config.title} - - {config.description} - - - - - - - - - - - - - {mode === "Open" && !hasArtistsInCollection && ( - - )} - - {mode === "Open" && hasArtistsInCollection && ( - - )} - - ) -} - -const FRAGMENT = graphql` - fragment NotificationCollectorProfileUpdatePrompt_notification on Notification { - item { - ... on CollectorProfileUpdatePromptNotificationItem { - me { - userInterestsConnection(interestType: ARTIST, first: 1) { - totalCount - } - } - } - } - } -` diff --git a/src/Components/Notifications/NotificationItem.tsx b/src/Components/Notifications/NotificationItem.tsx index aff37048e41..70df2e9eb80 100644 --- a/src/Components/Notifications/NotificationItem.tsx +++ b/src/Components/Notifications/NotificationItem.tsx @@ -16,7 +16,6 @@ import { __internal__useMatchMedia } from "Utils/Hooks/useMatchMedia" import { Media } from "Utils/Responsive" import styled from "styled-components" import { themeGet } from "@styled-system/theme-get" -import { NotificationItemCollectorProfileUpdatePrompt } from "Components/Notifications/NotificationItemCollectorProfileUpdatePrompt" import { NotificationItemUnreadIndicator } from "Components/Notifications/NotificationItemUnreadIndicator" const logger = createLogger("NotificationItem") @@ -30,9 +29,6 @@ const NotificationItem: FC = ({ notification, mode, }) => { - const { - state: { currentNotificationId }, - } = useNotificationsContext() const { tracking } = useNotificationsTracking() const { markAsRead } = useMarkNotificationAsRead() @@ -45,117 +41,99 @@ const NotificationItem: FC = ({ tracking.clickedActivityPanelNotificationItem(notification.notificationType) } - const isActive = currentNotificationId === notification.internalID - if (!notification.item) return null - switch (notification.item.__typename) { - case "CollectorProfileUpdatePromptNotificationItem": { - return ( - - ) - } + const remainingArtworksCount = notification.objectsCount - 4 + const shouldDisplayCounts = + isArtworksBasedNotification(notification.notificationType) && + remainingArtworksCount > 0 - // FIXME: Simplify by returning unique components for each notification type - default: { - const remainingArtworksCount = notification.objectsCount - 4 - const shouldDisplayCounts = - isArtworksBasedNotification(notification.notificationType) && - remainingArtworksCount > 0 + const subTitle = getNotificationSubTitle(notification) - const subTitle = getNotificationSubTitle(notification) - - return ( - - - {!!notification.previewImages.length && ( - - - }> - {notification.previewImages.map((image, index) => { - if (!image.resized) return null - - return ( - - ) - })} - - - - - {shouldDisplayCounts && ( - - + {remainingArtworksCount} - - )} - - )} + return ( + + + {!!notification.previewImages.length && ( + + + }> + {notification.previewImages.map((image, index) => { + if (!image.resized) return null + + return ( + + ) + })} + + + - + {shouldDisplayCounts && ( - {getNotificationPrelude(notification)} - - - - {notification.headline} + + {remainingArtworksCount} - - {!!subTitle && {subTitle}} - - - - {notification.item?.__typename === - "PartnerOfferCreatedNotificationItem" && - notification.item.expiresAt && ( - - )} - - + )} + + )} + + + + {getNotificationPrelude(notification)} + + + + {notification.headline} + + + {!!subTitle && {subTitle}} + + + + {notification.item?.__typename === + "PartnerOfferCreatedNotificationItem" && + notification.item.expiresAt && ( + + )} + + - {notification.isUnread && } - - ) - } - } + {notification.isUnread && } + + ) } export const NotificationItemFragmentContainer = createFragmentContainer( @@ -172,7 +150,6 @@ export const NotificationItemFragmentContainer = createFragmentContainer( notificationType objectsCount item { - ...NotificationItemCollectorProfileUpdatePrompt_notificationItem __typename ... on PartnerOfferCreatedNotificationItem { available diff --git a/src/Components/Notifications/NotificationItemCollectorProfileUpdatePrompt.tsx b/src/Components/Notifications/NotificationItemCollectorProfileUpdatePrompt.tsx deleted file mode 100644 index b7c615770b6..00000000000 --- a/src/Components/Notifications/NotificationItemCollectorProfileUpdatePrompt.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import { Box, Clickable, Text } from "@artsy/palette" -import { themeGet } from "@styled-system/theme-get" -import { FC, useState } from "react" -import styled, { css } from "styled-components" -import { graphql, useFragment } from "react-relay" -import { NotificationItemCollectorProfileUpdatePrompt_notificationItem$key } from "__generated__/NotificationItemCollectorProfileUpdatePrompt_notificationItem.graphql" -import { CompleteProfileCollectionDialog } from "Components/CompleteProfile/CompleteProfileCollectionDialog" -import { CompleteProfileInformationDialog } from "Components/CompleteProfile/CompleteProfileInformationDialog" -import { NotificationItemUnreadIndicator } from "Components/Notifications/NotificationItemUnreadIndicator" -import { useTracking } from "react-tracking" -import { ClickedActivityPanelNotificationItem } from "@artsy/cohesion/dist/Schema/Events/ActivityPanel" -import { ActionType } from "@artsy/cohesion" - -interface NotificationItemCollectorProfileUpdatePromptProps { - isActive: boolean - isUnread: boolean - notificationItem: NotificationItemCollectorProfileUpdatePrompt_notificationItem$key - onClick: () => void -} - -export const NotificationItemCollectorProfileUpdatePrompt: FC = ({ - isActive, - isUnread, - notificationItem: _notificationItem, - onClick, -}) => { - const notificationItem = useFragment(FRAGMENT, _notificationItem) - - const { trackEvent } = useTracking() - - const [mode, setMode] = useState<"Idle" | "Open">("Idle") - - const hasArtistsInCollection = - (notificationItem?.me?.userInterestsConnection?.totalCount ?? 0) > 0 - - const handleOpen = () => { - setMode("Open") - - onClick() - - const payload: ClickedActivityPanelNotificationItem = { - action: ActionType.clickedActivityPanelNotificationItem, - notification_type: hasArtistsInCollection - ? "complete your profile" - : "add artist to your collection", - } - - trackEvent(payload) - } - - const handleClose = () => { - setMode("Idle") - } - - // Show the profile prompt if the user already has artists in their collection - if (hasArtistsInCollection) { - return ( - <> - - - - Tell us a little bit more about you. - - - - By completing your profile, you’re more likely to receive quick - responses from galleries. -
- Artsy Message • Today -
-
- - {isUnread && } -
- - {mode === "Open" && ( - - )} - - ) - } - - // Otherwise show the artist collection prompt - return ( - <> - - - - Tell us about the artists in your collection. - - - - Show off your collection and make a great impression. -
- Artsy Message • Today -
-
- - {isUnread && } -
- - {mode === "Open" && ( - - )} - - ) -} - -const FRAGMENT = graphql` - fragment NotificationItemCollectorProfileUpdatePrompt_notificationItem on NotificationItem { - ... on CollectorProfileUpdatePromptNotificationItem { - me { - userInterestsConnection(interestType: ARTIST, first: 1) { - totalCount - } - } - } - } -` - -const Container = styled(Clickable).attrs({ - p: 2, - gap: 1, -})<{ isActive: boolean }>` - display: flex; - width: 100%; - align-items: center; - - &:hover { - background-color: ${themeGet("colors.black5")}; - } - - ${({ isActive }) => { - return ( - isActive && - css` - background-color: ${themeGet("colors.black5")}; - ` - ) - }} -` diff --git a/src/Components/Notifications/util.ts b/src/Components/Notifications/util.ts index 990420a3b7e..905f930f5ed 100644 --- a/src/Components/Notifications/util.ts +++ b/src/Components/Notifications/util.ts @@ -35,6 +35,10 @@ export const shouldDisplayNotification = ( return !!notification.item?.article?.internalID } + if (notification.notificationType === "COLLECTOR_PROFILE_UPDATE_PROMPT") { + return false + } + return true } diff --git a/src/__generated__/NotificationCollectorProfileUpdatePrompt_notification.graphql.ts b/src/__generated__/NotificationCollectorProfileUpdatePrompt_notification.graphql.ts deleted file mode 100644 index 9d020102952..00000000000 --- a/src/__generated__/NotificationCollectorProfileUpdatePrompt_notification.graphql.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @generated SignedSource<<7c9fb07ad9867c4743e7f8e7e70f81a7>> - * @lightSyntaxTransform - * @nogrep - */ - -/* tslint:disable */ -/* eslint-disable */ -// @ts-nocheck - -import { Fragment, ReaderFragment } from 'relay-runtime'; -import { FragmentRefs } from "relay-runtime"; -export type NotificationCollectorProfileUpdatePrompt_notification$data = { - readonly item: { - readonly me?: { - readonly userInterestsConnection: { - readonly totalCount: number | null | undefined; - } | null | undefined; - }; - } | null | undefined; - readonly " $fragmentType": "NotificationCollectorProfileUpdatePrompt_notification"; -}; -export type NotificationCollectorProfileUpdatePrompt_notification$key = { - readonly " $data"?: NotificationCollectorProfileUpdatePrompt_notification$data; - readonly " $fragmentSpreads": FragmentRefs<"NotificationCollectorProfileUpdatePrompt_notification">; -}; - -const node: ReaderFragment = { - "argumentDefinitions": [], - "kind": "Fragment", - "metadata": null, - "name": "NotificationCollectorProfileUpdatePrompt_notification", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": null, - "kind": "LinkedField", - "name": "item", - "plural": false, - "selections": [ - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - { - "kind": "Literal", - "name": "first", - "value": 1 - }, - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "totalCount", - "storageKey": null - } - ], - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - } - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - } - ], - "storageKey": null - } - ], - "type": "Notification", - "abstractKey": null -}; - -(node as any).hash = "e6be92eae09a99f5b9f5936dceb3c62d"; - -export default node; diff --git a/src/__generated__/NotificationItemCollectorProfileUpdatePrompt_notificationItem.graphql.ts b/src/__generated__/NotificationItemCollectorProfileUpdatePrompt_notificationItem.graphql.ts deleted file mode 100644 index 44abfd9f3a5..00000000000 --- a/src/__generated__/NotificationItemCollectorProfileUpdatePrompt_notificationItem.graphql.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @generated SignedSource<<7a15142e9b99167f5a576f0eaecb369c>> - * @lightSyntaxTransform - * @nogrep - */ - -/* tslint:disable */ -/* eslint-disable */ -// @ts-nocheck - -import { Fragment, ReaderFragment } from 'relay-runtime'; -import { FragmentRefs } from "relay-runtime"; -export type NotificationItemCollectorProfileUpdatePrompt_notificationItem$data = { - readonly me?: { - readonly userInterestsConnection: { - readonly totalCount: number | null | undefined; - } | null | undefined; - }; - readonly " $fragmentType": "NotificationItemCollectorProfileUpdatePrompt_notificationItem"; -}; -export type NotificationItemCollectorProfileUpdatePrompt_notificationItem$key = { - readonly " $data"?: NotificationItemCollectorProfileUpdatePrompt_notificationItem$data; - readonly " $fragmentSpreads": FragmentRefs<"NotificationItemCollectorProfileUpdatePrompt_notificationItem">; -}; - -const node: ReaderFragment = { - "argumentDefinitions": [], - "kind": "Fragment", - "metadata": null, - "name": "NotificationItemCollectorProfileUpdatePrompt_notificationItem", - "selections": [ - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - { - "kind": "Literal", - "name": "first", - "value": 1 - }, - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "totalCount", - "storageKey": null - } - ], - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - } - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - } - ], - "type": "NotificationItem", - "abstractKey": "__isNotificationItem" -}; - -(node as any).hash = "d8e0e0573ea533b32ac66de7f869adac"; - -export default node; diff --git a/src/__generated__/NotificationItem_notification.graphql.ts b/src/__generated__/NotificationItem_notification.graphql.ts index 7246291f8dc..d51c137c105 100644 --- a/src/__generated__/NotificationItem_notification.graphql.ts +++ b/src/__generated__/NotificationItem_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<8f30d31567eec2fe2a54053749a96ac5>> + * @generated SignedSource<<82fe7e090d5d505fd2d7e0113ea9254e>> * @lightSyntaxTransform * @nogrep */ @@ -17,10 +17,13 @@ export type NotificationItem_notification$data = { readonly internalID: string; readonly isUnread: boolean; readonly item: { - readonly __typename: string; - readonly available?: boolean | null | undefined; - readonly expiresAt?: string | null | undefined; - readonly " $fragmentSpreads": FragmentRefs<"NotificationItemCollectorProfileUpdatePrompt_notificationItem">; + readonly __typename: "PartnerOfferCreatedNotificationItem"; + readonly available: boolean | null | undefined; + readonly expiresAt: string | null | undefined; + } | { + // This will never be '%other', but we need some + // value in case none of the concrete values match. + readonly __typename: "%other"; } | null | undefined; readonly message: string; readonly notificationType: NotificationTypesEnum; @@ -114,11 +117,6 @@ return { "name": "item", "plural": false, "selections": [ - { - "args": null, - "kind": "FragmentSpread", - "name": "NotificationItemCollectorProfileUpdatePrompt_notificationItem" - }, { "alias": null, "args": null, @@ -227,6 +225,6 @@ return { }; })(); -(node as any).hash = "19d6409e35b65b09ecf22aa2aa931a1a"; +(node as any).hash = "b2e1725decadccbf37ef770c67b23c96"; export default node; diff --git a/src/__generated__/NotificationItem_test_Query.graphql.ts b/src/__generated__/NotificationItem_test_Query.graphql.ts index e252cd3e6e9..b65d9df386d 100644 --- a/src/__generated__/NotificationItem_test_Query.graphql.ts +++ b/src/__generated__/NotificationItem_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<4663cc384cadbc9241057b4456f3a077>> * @lightSyntaxTransform * @nogrep */ @@ -26,41 +26,33 @@ export type NotificationItem_test_Query = { }; const node: ConcreteRequest = (function(){ -var v0 = { - "kind": "Literal", - "name": "first", - "value": 1 -}, -v1 = [ - (v0/*: any*/) +var v0 = [ + { + "kind": "Literal", + "name": "first", + "value": 1 + } ], -v2 = { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "id", - "storageKey": null -}, -v3 = { +v1 = { "alias": null, "args": null, "kind": "ScalarField", "name": "internalID", "storageKey": null }, -v4 = { +v2 = { "enumValues": null, "nullable": false, "plural": false, "type": "String" }, -v5 = { +v3 = { "enumValues": null, "nullable": false, "plural": false, "type": "ID" }, -v6 = { +v4 = { "enumValues": null, "nullable": true, "plural": false, @@ -75,7 +67,7 @@ return { "selections": [ { "alias": null, - "args": (v1/*: any*/), + "args": (v0/*: any*/), "concreteType": "NotificationConnection", "kind": "LinkedField", "name": "notificationsConnection", @@ -123,7 +115,7 @@ return { "selections": [ { "alias": null, - "args": (v1/*: any*/), + "args": (v0/*: any*/), "concreteType": "NotificationConnection", "kind": "LinkedField", "name": "notificationsConnection", @@ -145,8 +137,14 @@ return { "name": "node", "plural": false, "selections": [ - (v2/*: any*/), - (v3/*: any*/), + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + }, + (v1/*: any*/), { "alias": null, "args": null, @@ -197,54 +195,6 @@ return { "name": "item", "plural": false, "selections": [ - { - "kind": "TypeDiscriminator", - "abstractKey": "__isNotificationItem" - }, - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - (v0/*: any*/), - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": [ - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "totalCount", - "storageKey": null - } - ], - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - }, - (v2/*: any*/) - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - }, { "alias": null, "args": null, @@ -290,7 +240,7 @@ return { "name": "previewImages", "plural": true, "selections": [ - (v3/*: any*/), + (v1/*: any*/), { "alias": null, "args": null, @@ -367,7 +317,7 @@ return { ] }, "params": { - "cacheID": "74621c1ba02fc130909f1c043db3abfb", + "cacheID": "38a719ba623ea6b6c085c6ecffeabd35", "id": null, "metadata": { "relayTestingSelectionTypeInfo": { @@ -389,9 +339,9 @@ return { "plural": false, "type": "Notification" }, - "notificationsConnection.edges.node.headline": (v4/*: any*/), - "notificationsConnection.edges.node.id": (v5/*: any*/), - "notificationsConnection.edges.node.internalID": (v5/*: any*/), + "notificationsConnection.edges.node.headline": (v2/*: any*/), + "notificationsConnection.edges.node.id": (v3/*: any*/), + "notificationsConnection.edges.node.internalID": (v3/*: any*/), "notificationsConnection.edges.node.isUnread": { "enumValues": null, "nullable": false, @@ -404,35 +354,15 @@ return { "plural": false, "type": "NotificationItem" }, - "notificationsConnection.edges.node.item.__isNotificationItem": (v4/*: any*/), - "notificationsConnection.edges.node.item.__typename": (v4/*: any*/), + "notificationsConnection.edges.node.item.__typename": (v2/*: any*/), "notificationsConnection.edges.node.item.available": { "enumValues": null, "nullable": true, "plural": false, "type": "Boolean" }, - "notificationsConnection.edges.node.item.expiresAt": (v6/*: any*/), - "notificationsConnection.edges.node.item.me": { - "enumValues": null, - "nullable": false, - "plural": false, - "type": "Me" - }, - "notificationsConnection.edges.node.item.me.id": (v5/*: any*/), - "notificationsConnection.edges.node.item.me.userInterestsConnection": { - "enumValues": null, - "nullable": true, - "plural": false, - "type": "UserInterestConnection" - }, - "notificationsConnection.edges.node.item.me.userInterestsConnection.totalCount": { - "enumValues": null, - "nullable": true, - "plural": false, - "type": "Int" - }, - "notificationsConnection.edges.node.message": (v4/*: any*/), + "notificationsConnection.edges.node.item.expiresAt": (v4/*: any*/), + "notificationsConnection.edges.node.message": (v2/*: any*/), "notificationsConnection.edges.node.notificationType": { "enumValues": [ "ARTICLE_FEATURED_ARTIST", @@ -459,7 +389,7 @@ return { "plural": true, "type": "Image" }, - "notificationsConnection.edges.node.previewImages.blurhashDataURL": (v6/*: any*/), + "notificationsConnection.edges.node.previewImages.blurhashDataURL": (v4/*: any*/), "notificationsConnection.edges.node.previewImages.internalID": { "enumValues": null, "nullable": true, @@ -472,15 +402,15 @@ return { "plural": false, "type": "ResizedImageUrl" }, - "notificationsConnection.edges.node.previewImages.resized.srcSet": (v4/*: any*/), - "notificationsConnection.edges.node.publishedAt": (v4/*: any*/), - "notificationsConnection.edges.node.targetHref": (v4/*: any*/), - "notificationsConnection.edges.node.title": (v4/*: any*/) + "notificationsConnection.edges.node.previewImages.resized.srcSet": (v2/*: any*/), + "notificationsConnection.edges.node.publishedAt": (v2/*: any*/), + "notificationsConnection.edges.node.targetHref": (v2/*: any*/), + "notificationsConnection.edges.node.title": (v2/*: any*/) } }, "name": "NotificationItem_test_Query", "operationKind": "query", - "text": "query NotificationItem_test_Query {\n notificationsConnection(first: 1) {\n edges {\n node {\n ...NotificationItem_notification\n id\n }\n }\n }\n}\n\nfragment NotificationItemCollectorProfileUpdatePrompt_notificationItem on NotificationItem {\n __isNotificationItem: __typename\n ... on CollectorProfileUpdatePromptNotificationItem {\n me {\n userInterestsConnection(interestType: ARTIST, first: 1) {\n totalCount\n }\n id\n }\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n ...NotificationItemCollectorProfileUpdatePrompt_notificationItem\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n" + "text": "query NotificationItem_test_Query {\n notificationsConnection(first: 1) {\n edges {\n node {\n ...NotificationItem_notification\n id\n }\n }\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n" } }; })(); diff --git a/src/__generated__/NotificationQuery.graphql.ts b/src/__generated__/NotificationQuery.graphql.ts index ec9816212e3..e0b8adf02ba 100644 --- a/src/__generated__/NotificationQuery.graphql.ts +++ b/src/__generated__/NotificationQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<8d6623dc961ff3d5ee5b71234b5c4604>> + * @generated SignedSource<<22cd2cc699c5c737a691f678c6279165>> * @lightSyntaxTransform * @nogrep */ @@ -21,7 +21,7 @@ export type NotificationQuery$data = { readonly internalID: string; readonly notificationType: NotificationTypesEnum; readonly targetHref: string; - readonly " $fragmentSpreads": FragmentRefs<"AlertNotification_notification" | "ArticleFeaturedArtistNotification_notification" | "ArtworkPublishedNotification_notification" | "NotificationCollectorProfileUpdatePrompt_notification" | "PartnerOfferCreatedNotification_notification" | "PartnerShowOpenedNotification_notification" | "ViewingRoomPublishedNotification_notification">; + readonly " $fragmentSpreads": FragmentRefs<"AlertNotification_notification" | "ArticleFeaturedArtistNotification_notification" | "ArtworkPublishedNotification_notification" | "PartnerOfferCreatedNotification_notification" | "PartnerShowOpenedNotification_notification" | "ViewingRoomPublishedNotification_notification">; } | null | undefined; } | null | undefined; }; @@ -517,34 +517,27 @@ v32 = { "storageKey": null }, v33 = { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "totalCount", - "storageKey": null -}, -v34 = { "alias": null, "args": null, "kind": "ScalarField", "name": "slug", "storageKey": null }, -v35 = { +v34 = { "alias": null, "args": null, "kind": "ScalarField", "name": "src", "storageKey": null }, -v36 = { +v35 = { "alias": null, "args": null, "kind": "ScalarField", "name": "srcSet", "storageKey": null }, -v37 = { +v36 = { "alias": null, "args": null, "concreteType": "Profile", @@ -556,11 +549,6 @@ v37 = { (v2/*: any*/) ], "storageKey": null -}, -v38 = { - "kind": "Literal", - "name": "first", - "value": 1 }; return { "fragment": { @@ -615,11 +603,6 @@ return { "kind": "FragmentSpread", "name": "ViewingRoomPublishedNotification_notification" }, - { - "args": null, - "kind": "FragmentSpread", - "name": "NotificationCollectorProfileUpdatePrompt_notification" - }, (v2/*: any*/), (v3/*: any*/), (v4/*: any*/), @@ -725,7 +708,13 @@ return { ], "storageKey": null }, - (v33/*: any*/) + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "totalCount", + "storageKey": null + } ], "storageKey": "artworksConnection(first:10)" }, @@ -772,7 +761,7 @@ return { "plural": true, "selections": [ (v19/*: any*/), - (v34/*: any*/), + (v33/*: any*/), (v2/*: any*/) ], "storageKey": null @@ -823,7 +812,7 @@ return { "storageKey": null }, (v19/*: any*/), - (v34/*: any*/), + (v33/*: any*/), (v2/*: any*/) ], "storageKey": null @@ -898,8 +887,8 @@ return { "name": "cropped", "plural": false, "selections": [ + (v34/*: any*/), (v35/*: any*/), - (v36/*: any*/), (v30/*: any*/), (v31/*: any*/) ], @@ -937,7 +926,7 @@ return { "plural": false, "selections": [ (v19/*: any*/), - (v34/*: any*/), + (v33/*: any*/), (v3/*: any*/), (v7/*: any*/), (v2/*: any*/) @@ -1010,7 +999,7 @@ return { "selections": [ (v7/*: any*/), (v19/*: any*/), - (v37/*: any*/), + (v36/*: any*/), (v2/*: any*/) ], "storageKey": null @@ -1105,15 +1094,15 @@ return { "name": "cropped", "plural": false, "selections": [ - (v35/*: any*/), - (v36/*: any*/) + (v34/*: any*/), + (v35/*: any*/) ], "storageKey": "cropped(height:450,version:[\"larger\",\"large\"],width:600)" } ], "storageKey": null }, - (v34/*: any*/), + (v33/*: any*/), (v2/*: any*/) ], "storageKey": null @@ -1141,7 +1130,7 @@ return { "selections": [ (v19/*: any*/), (v7/*: any*/), - (v37/*: any*/), + (v36/*: any*/), (v2/*: any*/) ], "storageKey": null @@ -1223,44 +1212,6 @@ return { ], "type": "ViewingRoomPublishedNotificationItem", "abstractKey": null - }, - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - (v38/*: any*/), - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": [ - (v33/*: any*/) - ], - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - }, - (v2/*: any*/) - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null } ], "storageKey": null @@ -1283,7 +1234,11 @@ return { { "alias": "offerArtworksConnection", "args": [ - (v38/*: any*/) + { + "kind": "Literal", + "name": "first", + "value": 1 + } ], "concreteType": "ArtworkConnection", "kind": "LinkedField", @@ -1307,7 +1262,7 @@ return { "plural": false, "selections": [ (v3/*: any*/), - (v34/*: any*/), + (v33/*: any*/), (v7/*: any*/), (v8/*: any*/), (v28/*: any*/), @@ -1403,16 +1358,16 @@ return { ] }, "params": { - "cacheID": "43feee9d10fb179b040f2b43b611d08c", + "cacheID": "a988f4e43e687c59ff72dd9ac781157f", "id": null, "metadata": {}, "name": "NotificationQuery", "operationKind": "query", - "text": "query NotificationQuery(\n $internalID: String!\n) {\n me {\n notification(id: $internalID) {\n ...AlertNotification_notification\n ...ArtworkPublishedNotification_notification\n ...ArticleFeaturedArtistNotification_notification\n ...PartnerOfferCreatedNotification_notification\n ...PartnerShowOpenedNotification_notification\n ...ViewingRoomPublishedNotification_notification\n ...NotificationCollectorProfileUpdatePrompt_notification\n id\n internalID\n notificationType\n targetHref\n }\n id\n }\n}\n\nfragment AlertNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on AlertNotificationItem {\n alert {\n internalID\n artists {\n name\n slug\n id\n }\n labels {\n displayValue\n }\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArticleFeaturedArtistNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n href\n thumbnailTitle\n byline\n publishedAt(format: \"MMM D, YYYY\")\n thumbnailImage {\n cropped(width: 910, height: 607) {\n src\n srcSet\n width\n height\n }\n }\n id\n }\n artistsConnection(first: 10) {\n edges {\n node {\n name\n slug\n internalID\n href\n id\n }\n }\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArtworkPublishedNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on ArtworkPublishedNotificationItem {\n artists {\n internalID\n isFollowed\n name\n slug\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment BidTimerLine_artwork on Artwork {\n collectorSignals {\n auction {\n lotClosesAt\n registrationEndsAt\n onlineBiddingExtended\n }\n }\n}\n\nfragment Details_artwork_1ZRKfT on Artwork {\n internalID\n href\n title\n date\n collectorSignals {\n primaryLabel\n auction {\n bidCount\n lotClosesAt\n liveBiddingStarted\n registrationEndsAt\n onlineBiddingExtended\n }\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n sale_message: saleMessage\n cultural_maker: culturalMaker\n artist(shallow: true) {\n targetSupply {\n isP1\n }\n id\n }\n marketPriceInsights {\n demandRank\n }\n artists(shallow: true) {\n id\n href\n name\n }\n collecting_institution: collectingInstitution\n partner(shallow: true) {\n name\n href\n id\n }\n sale {\n endAt\n cascadingEndTimeIntervalMinutes\n extendedBiddingIntervalMinutes\n startAt\n is_auction: isAuction\n is_closed: isClosed\n id\n }\n sale_artwork: saleArtwork {\n lotID\n lotLabel\n endAt\n extendedBiddingEndAt\n formattedEndDateTime\n counts {\n bidder_positions: bidderPositions\n }\n highest_bid: highestBid {\n display\n }\n opening_bid: openingBid {\n display\n }\n id\n }\n ...PrimaryLabelLine_artwork\n ...BidTimerLine_artwork\n ...HoverDetails_artwork\n}\n\nfragment ExclusiveAccessBadge_artwork on Artwork {\n isUnlisted\n}\n\nfragment HoverDetails_artwork on Artwork {\n internalID\n attributionClass {\n name\n id\n }\n mediumType {\n filterGene {\n name\n id\n }\n }\n}\n\nfragment Metadata_artwork on Artwork {\n ...Details_artwork_1ZRKfT\n internalID\n href\n}\n\nfragment NotificationArtworkList_artworksConnection on ArtworkConnection {\n edges {\n node {\n ...NotificationArtwork_artwork\n internalID\n id\n }\n }\n}\n\nfragment NotificationArtwork_artwork on Artwork {\n ...ExclusiveAccessBadge_artwork\n ...Metadata_artwork\n artistNames\n href\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n title\n}\n\nfragment NotificationCollectorProfileUpdatePrompt_notification on Notification {\n item {\n __typename\n ... on CollectorProfileUpdatePromptNotificationItem {\n me {\n userInterestsConnection(interestType: ARTIST, first: 1) {\n totalCount\n }\n id\n }\n }\n }\n}\n\nfragment NotificationPartnerShow_show on Show {\n location {\n city\n id\n }\n exhibitionPeriod\n startAt\n endAt\n name\n description\n href\n coverImage {\n cropped(width: 600, height: 450, version: [\"larger\", \"large\"]) {\n src\n srcSet\n }\n }\n slug\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationViewingRoom_viewingRoom on ViewingRoom {\n title\n href\n introStatement\n image {\n imageURLs {\n normalized\n }\n width\n height\n }\n}\n\nfragment NotificationViewingRoomsList_viewingRoomsConnection on ViewingRoomsConnection {\n edges {\n node {\n ...NotificationViewingRoom_viewingRoom\n internalID\n }\n }\n}\n\nfragment PartnerOfferArtwork_artwork on Artwork {\n internalID\n slug\n href\n title\n artistNames\n price\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n partner(shallow: true) {\n profile {\n icon {\n url(version: \"square140\")\n }\n id\n }\n id\n }\n collectorSignals {\n primaryLabel\n }\n ...Metadata_artwork\n}\n\nfragment PartnerOfferCreatedNotification_notification on Notification {\n headline\n targetHref\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n partnerOffer {\n internalID\n endAt\n isAvailable\n note\n source\n priceWithDiscount {\n display\n }\n id\n }\n }\n }\n offerArtworksConnection: artworksConnection(first: 1) {\n edges {\n node {\n ...PartnerOfferArtwork_artwork\n id\n }\n }\n }\n}\n\nfragment PartnerShowOpenedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ShowOpenedNotificationItem {\n partner {\n href\n name\n profile {\n internalID\n id\n }\n id\n }\n showsConnection {\n edges {\n node {\n internalID\n ...NotificationPartnerShow_show\n id\n }\n }\n }\n }\n }\n ...NotificationTypeLabel_notification\n}\n\nfragment PrimaryLabelLine_artwork on Artwork {\n collectorSignals {\n primaryLabel\n }\n}\n\nfragment ViewingRoomPublishedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n partner {\n name\n href\n profile {\n internalID\n id\n }\n id\n }\n viewingRoomsConnection(first: 10) {\n ...NotificationViewingRoomsList_viewingRoomsConnection\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n" + "text": "query NotificationQuery(\n $internalID: String!\n) {\n me {\n notification(id: $internalID) {\n ...AlertNotification_notification\n ...ArtworkPublishedNotification_notification\n ...ArticleFeaturedArtistNotification_notification\n ...PartnerOfferCreatedNotification_notification\n ...PartnerShowOpenedNotification_notification\n ...ViewingRoomPublishedNotification_notification\n id\n internalID\n notificationType\n targetHref\n }\n id\n }\n}\n\nfragment AlertNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on AlertNotificationItem {\n alert {\n internalID\n artists {\n name\n slug\n id\n }\n labels {\n displayValue\n }\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArticleFeaturedArtistNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n href\n thumbnailTitle\n byline\n publishedAt(format: \"MMM D, YYYY\")\n thumbnailImage {\n cropped(width: 910, height: 607) {\n src\n srcSet\n width\n height\n }\n }\n id\n }\n artistsConnection(first: 10) {\n edges {\n node {\n name\n slug\n internalID\n href\n id\n }\n }\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArtworkPublishedNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on ArtworkPublishedNotificationItem {\n artists {\n internalID\n isFollowed\n name\n slug\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment BidTimerLine_artwork on Artwork {\n collectorSignals {\n auction {\n lotClosesAt\n registrationEndsAt\n onlineBiddingExtended\n }\n }\n}\n\nfragment Details_artwork_1ZRKfT on Artwork {\n internalID\n href\n title\n date\n collectorSignals {\n primaryLabel\n auction {\n bidCount\n lotClosesAt\n liveBiddingStarted\n registrationEndsAt\n onlineBiddingExtended\n }\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n sale_message: saleMessage\n cultural_maker: culturalMaker\n artist(shallow: true) {\n targetSupply {\n isP1\n }\n id\n }\n marketPriceInsights {\n demandRank\n }\n artists(shallow: true) {\n id\n href\n name\n }\n collecting_institution: collectingInstitution\n partner(shallow: true) {\n name\n href\n id\n }\n sale {\n endAt\n cascadingEndTimeIntervalMinutes\n extendedBiddingIntervalMinutes\n startAt\n is_auction: isAuction\n is_closed: isClosed\n id\n }\n sale_artwork: saleArtwork {\n lotID\n lotLabel\n endAt\n extendedBiddingEndAt\n formattedEndDateTime\n counts {\n bidder_positions: bidderPositions\n }\n highest_bid: highestBid {\n display\n }\n opening_bid: openingBid {\n display\n }\n id\n }\n ...PrimaryLabelLine_artwork\n ...BidTimerLine_artwork\n ...HoverDetails_artwork\n}\n\nfragment ExclusiveAccessBadge_artwork on Artwork {\n isUnlisted\n}\n\nfragment HoverDetails_artwork on Artwork {\n internalID\n attributionClass {\n name\n id\n }\n mediumType {\n filterGene {\n name\n id\n }\n }\n}\n\nfragment Metadata_artwork on Artwork {\n ...Details_artwork_1ZRKfT\n internalID\n href\n}\n\nfragment NotificationArtworkList_artworksConnection on ArtworkConnection {\n edges {\n node {\n ...NotificationArtwork_artwork\n internalID\n id\n }\n }\n}\n\nfragment NotificationArtwork_artwork on Artwork {\n ...ExclusiveAccessBadge_artwork\n ...Metadata_artwork\n artistNames\n href\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n title\n}\n\nfragment NotificationPartnerShow_show on Show {\n location {\n city\n id\n }\n exhibitionPeriod\n startAt\n endAt\n name\n description\n href\n coverImage {\n cropped(width: 600, height: 450, version: [\"larger\", \"large\"]) {\n src\n srcSet\n }\n }\n slug\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationViewingRoom_viewingRoom on ViewingRoom {\n title\n href\n introStatement\n image {\n imageURLs {\n normalized\n }\n width\n height\n }\n}\n\nfragment NotificationViewingRoomsList_viewingRoomsConnection on ViewingRoomsConnection {\n edges {\n node {\n ...NotificationViewingRoom_viewingRoom\n internalID\n }\n }\n}\n\nfragment PartnerOfferArtwork_artwork on Artwork {\n internalID\n slug\n href\n title\n artistNames\n price\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n partner(shallow: true) {\n profile {\n icon {\n url(version: \"square140\")\n }\n id\n }\n id\n }\n collectorSignals {\n primaryLabel\n }\n ...Metadata_artwork\n}\n\nfragment PartnerOfferCreatedNotification_notification on Notification {\n headline\n targetHref\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n partnerOffer {\n internalID\n endAt\n isAvailable\n note\n source\n priceWithDiscount {\n display\n }\n id\n }\n }\n }\n offerArtworksConnection: artworksConnection(first: 1) {\n edges {\n node {\n ...PartnerOfferArtwork_artwork\n id\n }\n }\n }\n}\n\nfragment PartnerShowOpenedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ShowOpenedNotificationItem {\n partner {\n href\n name\n profile {\n internalID\n id\n }\n id\n }\n showsConnection {\n edges {\n node {\n internalID\n ...NotificationPartnerShow_show\n id\n }\n }\n }\n }\n }\n ...NotificationTypeLabel_notification\n}\n\nfragment PrimaryLabelLine_artwork on Artwork {\n collectorSignals {\n primaryLabel\n }\n}\n\nfragment ViewingRoomPublishedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n partner {\n name\n href\n profile {\n internalID\n id\n }\n id\n }\n viewingRoomsConnection(first: 10) {\n ...NotificationViewingRoomsList_viewingRoomsConnection\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n" } }; })(); -(node as any).hash = "26288c70d551ba2b8967d63020245660"; +(node as any).hash = "c5aad69e50ff30717ac6b135b8b412c6"; export default node; diff --git a/src/__generated__/NotificationsListNextQuery.graphql.ts b/src/__generated__/NotificationsListNextQuery.graphql.ts index d5667a47de7..220ff3a26b6 100644 --- a/src/__generated__/NotificationsListNextQuery.graphql.ts +++ b/src/__generated__/NotificationsListNextQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -85,11 +85,6 @@ v4 = { "storageKey": null }, v5 = { - "kind": "Literal", - "name": "first", - "value": 1 -}, -v6 = { "alias": null, "args": null, "kind": "ScalarField", @@ -239,47 +234,7 @@ return { "name": "item", "plural": false, "selections": [ - { - "kind": "TypeDiscriminator", - "abstractKey": "__isNotificationItem" - }, - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - (v5/*: any*/), - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": (v3/*: any*/), - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - }, - (v4/*: any*/) - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - }, - (v6/*: any*/), + (v5/*: any*/), { "kind": "InlineFragment", "selections": [ @@ -307,7 +262,11 @@ return { { "alias": null, "args": [ - (v5/*: any*/) + { + "kind": "Literal", + "name": "first", + "value": 1 + } ], "concreteType": "ViewingRoomsConnection", "kind": "LinkedField", @@ -422,7 +381,7 @@ return { "name": "publishedAt", "storageKey": "publishedAt(format:\"RELATIVE\")" }, - (v6/*: any*/) + (v5/*: any*/) ], "storageKey": null }, @@ -479,12 +438,12 @@ return { ] }, "params": { - "cacheID": "e26ae6a78be0945f6bd5f3def1a75906", + "cacheID": "41ac9bd3c03675d0b405c601a87be21a", "id": null, "metadata": {}, "name": "NotificationsListNextQuery", "operationKind": "query", - "text": "query NotificationsListNextQuery(\n $count: Int!\n $cursor: String\n $types: [NotificationTypesEnum]\n) {\n viewer {\n ...NotificationsList_viewer_2TJroH\n }\n}\n\nfragment NotificationItemCollectorProfileUpdatePrompt_notificationItem on NotificationItem {\n __isNotificationItem: __typename\n ... on CollectorProfileUpdatePromptNotificationItem {\n me {\n userInterestsConnection(interestType: ARTIST, first: 1) {\n totalCount\n }\n id\n }\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n ...NotificationItemCollectorProfileUpdatePrompt_notificationItem\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer_2TJroH on Viewer {\n notifications: notificationsConnection(first: $count, after: $cursor, notificationTypes: $types) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" + "text": "query NotificationsListNextQuery(\n $count: Int!\n $cursor: String\n $types: [NotificationTypesEnum]\n) {\n viewer {\n ...NotificationsList_viewer_2TJroH\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer_2TJroH on Viewer {\n notifications: notificationsConnection(first: $count, after: $cursor, notificationTypes: $types) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" } }; })(); diff --git a/src/__generated__/NotificationsListQuery.graphql.ts b/src/__generated__/NotificationsListQuery.graphql.ts index fb3e7308533..99471596f93 100644 --- a/src/__generated__/NotificationsListQuery.graphql.ts +++ b/src/__generated__/NotificationsListQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<0b9988c196bb585fced8c5fdaf116bfa>> * @lightSyntaxTransform * @nogrep */ @@ -68,11 +68,6 @@ v4 = { "storageKey": null }, v5 = { - "kind": "Literal", - "name": "first", - "value": 1 -}, -v6 = { "alias": null, "args": null, "kind": "ScalarField", @@ -212,47 +207,7 @@ return { "name": "item", "plural": false, "selections": [ - { - "kind": "TypeDiscriminator", - "abstractKey": "__isNotificationItem" - }, - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - (v5/*: any*/), - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": (v3/*: any*/), - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - }, - (v4/*: any*/) - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - }, - (v6/*: any*/), + (v5/*: any*/), { "kind": "InlineFragment", "selections": [ @@ -280,7 +235,11 @@ return { { "alias": null, "args": [ - (v5/*: any*/) + { + "kind": "Literal", + "name": "first", + "value": 1 + } ], "concreteType": "ViewingRoomsConnection", "kind": "LinkedField", @@ -395,7 +354,7 @@ return { "name": "publishedAt", "storageKey": "publishedAt(format:\"RELATIVE\")" }, - (v6/*: any*/) + (v5/*: any*/) ], "storageKey": null }, @@ -452,12 +411,12 @@ return { ] }, "params": { - "cacheID": "e649c90095213bb4bee661dad2afe695", + "cacheID": "64d0f84178880fab5fef21d41d8cb7df", "id": null, "metadata": {}, "name": "NotificationsListQuery", "operationKind": "query", - "text": "query NotificationsListQuery(\n $types: [NotificationTypesEnum]\n) {\n viewer {\n ...NotificationsList_viewer_1OKkmt\n }\n}\n\nfragment NotificationItemCollectorProfileUpdatePrompt_notificationItem on NotificationItem {\n __isNotificationItem: __typename\n ... on CollectorProfileUpdatePromptNotificationItem {\n me {\n userInterestsConnection(interestType: ARTIST, first: 1) {\n totalCount\n }\n id\n }\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n ...NotificationItemCollectorProfileUpdatePrompt_notificationItem\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer_1OKkmt on Viewer {\n notifications: notificationsConnection(first: 10, notificationTypes: $types) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" + "text": "query NotificationsListQuery(\n $types: [NotificationTypesEnum]\n) {\n viewer {\n ...NotificationsList_viewer_1OKkmt\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer_1OKkmt on Viewer {\n notifications: notificationsConnection(first: 10, notificationTypes: $types) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" } }; })(); diff --git a/src/__generated__/NotificationsList_test_Query.graphql.ts b/src/__generated__/NotificationsList_test_Query.graphql.ts index 554a52b3fc7..334fdf4e5a2 100644 --- a/src/__generated__/NotificationsList_test_Query.graphql.ts +++ b/src/__generated__/NotificationsList_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -53,42 +53,37 @@ v3 = { "storageKey": null }, v4 = { - "kind": "Literal", - "name": "first", - "value": 1 -}, -v5 = { "alias": null, "args": null, "kind": "ScalarField", "name": "__typename", "storageKey": null }, -v6 = { +v5 = { "enumValues": null, "nullable": false, "plural": false, "type": "String" }, -v7 = { +v6 = { "enumValues": null, "nullable": true, "plural": false, "type": "Int" }, -v8 = { +v7 = { "enumValues": null, "nullable": false, "plural": false, "type": "ID" }, -v9 = { +v8 = { "enumValues": null, "nullable": false, "plural": false, "type": "Boolean" }, -v10 = { +v9 = { "enumValues": null, "nullable": true, "plural": false, @@ -221,47 +216,7 @@ return { "name": "item", "plural": false, "selections": [ - { - "kind": "TypeDiscriminator", - "abstractKey": "__isNotificationItem" - }, - { - "kind": "InlineFragment", - "selections": [ - { - "alias": null, - "args": null, - "concreteType": "Me", - "kind": "LinkedField", - "name": "me", - "plural": false, - "selections": [ - { - "alias": null, - "args": [ - (v4/*: any*/), - { - "kind": "Literal", - "name": "interestType", - "value": "ARTIST" - } - ], - "concreteType": "UserInterestConnection", - "kind": "LinkedField", - "name": "userInterestsConnection", - "plural": false, - "selections": (v2/*: any*/), - "storageKey": "userInterestsConnection(first:1,interestType:\"ARTIST\")" - }, - (v3/*: any*/) - ], - "storageKey": null - } - ], - "type": "CollectorProfileUpdatePromptNotificationItem", - "abstractKey": null - }, - (v5/*: any*/), + (v4/*: any*/), { "kind": "InlineFragment", "selections": [ @@ -289,7 +244,11 @@ return { { "alias": null, "args": [ - (v4/*: any*/) + { + "kind": "Literal", + "name": "first", + "value": 1 + } ], "concreteType": "ViewingRoomsConnection", "kind": "LinkedField", @@ -404,7 +363,7 @@ return { "name": "publishedAt", "storageKey": "publishedAt(format:\"RELATIVE\")" }, - (v5/*: any*/) + (v4/*: any*/) ], "storageKey": null }, @@ -461,7 +420,7 @@ return { ] }, "params": { - "cacheID": "4a2101aaf86611d121de2cfca5f946b2", + "cacheID": "fff5ab9776ae98878b8f2ec023f581df", "id": null, "metadata": { "relayTestingSelectionTypeInfo": { @@ -483,70 +442,55 @@ return { "plural": true, "type": "NotificationEdge" }, - "viewer.notifications.edges.cursor": (v6/*: any*/), + "viewer.notifications.edges.cursor": (v5/*: any*/), "viewer.notifications.edges.node": { "enumValues": null, "nullable": true, "plural": false, "type": "Notification" }, - "viewer.notifications.edges.node.__typename": (v6/*: any*/), + "viewer.notifications.edges.node.__typename": (v5/*: any*/), "viewer.notifications.edges.node.artworks": { "enumValues": null, "nullable": true, "plural": false, "type": "ArtworkConnection" }, - "viewer.notifications.edges.node.artworks.totalCount": (v7/*: any*/), - "viewer.notifications.edges.node.headline": (v6/*: any*/), - "viewer.notifications.edges.node.id": (v8/*: any*/), - "viewer.notifications.edges.node.internalID": (v8/*: any*/), - "viewer.notifications.edges.node.isUnread": (v9/*: any*/), + "viewer.notifications.edges.node.artworks.totalCount": (v6/*: any*/), + "viewer.notifications.edges.node.headline": (v5/*: any*/), + "viewer.notifications.edges.node.id": (v7/*: any*/), + "viewer.notifications.edges.node.internalID": (v7/*: any*/), + "viewer.notifications.edges.node.isUnread": (v8/*: any*/), "viewer.notifications.edges.node.item": { "enumValues": null, "nullable": true, "plural": false, "type": "NotificationItem" }, - "viewer.notifications.edges.node.item.__isNotificationItem": (v6/*: any*/), - "viewer.notifications.edges.node.item.__typename": (v6/*: any*/), + "viewer.notifications.edges.node.item.__typename": (v5/*: any*/), "viewer.notifications.edges.node.item.article": { "enumValues": null, "nullable": true, "plural": false, "type": "Article" }, - "viewer.notifications.edges.node.item.article.id": (v8/*: any*/), - "viewer.notifications.edges.node.item.article.internalID": (v8/*: any*/), + "viewer.notifications.edges.node.item.article.id": (v7/*: any*/), + "viewer.notifications.edges.node.item.article.internalID": (v7/*: any*/), "viewer.notifications.edges.node.item.available": { "enumValues": null, "nullable": true, "plural": false, "type": "Boolean" }, - "viewer.notifications.edges.node.item.expiresAt": (v10/*: any*/), - "viewer.notifications.edges.node.item.me": { - "enumValues": null, - "nullable": false, - "plural": false, - "type": "Me" - }, - "viewer.notifications.edges.node.item.me.id": (v8/*: any*/), - "viewer.notifications.edges.node.item.me.userInterestsConnection": { - "enumValues": null, - "nullable": true, - "plural": false, - "type": "UserInterestConnection" - }, - "viewer.notifications.edges.node.item.me.userInterestsConnection.totalCount": (v7/*: any*/), + "viewer.notifications.edges.node.item.expiresAt": (v9/*: any*/), "viewer.notifications.edges.node.item.viewingRoomsConnection": { "enumValues": null, "nullable": true, "plural": false, "type": "ViewingRoomsConnection" }, - "viewer.notifications.edges.node.item.viewingRoomsConnection.totalCount": (v7/*: any*/), - "viewer.notifications.edges.node.message": (v6/*: any*/), + "viewer.notifications.edges.node.item.viewingRoomsConnection.totalCount": (v6/*: any*/), + "viewer.notifications.edges.node.message": (v5/*: any*/), "viewer.notifications.edges.node.notificationType": { "enumValues": [ "ARTICLE_FEATURED_ARTIST", @@ -573,7 +517,7 @@ return { "plural": true, "type": "Image" }, - "viewer.notifications.edges.node.previewImages.blurhashDataURL": (v10/*: any*/), + "viewer.notifications.edges.node.previewImages.blurhashDataURL": (v9/*: any*/), "viewer.notifications.edges.node.previewImages.internalID": { "enumValues": null, "nullable": true, @@ -586,23 +530,23 @@ return { "plural": false, "type": "ResizedImageUrl" }, - "viewer.notifications.edges.node.previewImages.resized.srcSet": (v6/*: any*/), - "viewer.notifications.edges.node.publishedAt": (v6/*: any*/), - "viewer.notifications.edges.node.targetHref": (v6/*: any*/), - "viewer.notifications.edges.node.title": (v6/*: any*/), + "viewer.notifications.edges.node.previewImages.resized.srcSet": (v5/*: any*/), + "viewer.notifications.edges.node.publishedAt": (v5/*: any*/), + "viewer.notifications.edges.node.targetHref": (v5/*: any*/), + "viewer.notifications.edges.node.title": (v5/*: any*/), "viewer.notifications.pageInfo": { "enumValues": null, "nullable": false, "plural": false, "type": "PageInfo" }, - "viewer.notifications.pageInfo.endCursor": (v10/*: any*/), - "viewer.notifications.pageInfo.hasNextPage": (v9/*: any*/) + "viewer.notifications.pageInfo.endCursor": (v9/*: any*/), + "viewer.notifications.pageInfo.hasNextPage": (v8/*: any*/) } }, "name": "NotificationsList_test_Query", "operationKind": "query", - "text": "query NotificationsList_test_Query {\n viewer {\n ...NotificationsList_viewer\n }\n}\n\nfragment NotificationItemCollectorProfileUpdatePrompt_notificationItem on NotificationItem {\n __isNotificationItem: __typename\n ... on CollectorProfileUpdatePromptNotificationItem {\n me {\n userInterestsConnection(interestType: ARTIST, first: 1) {\n totalCount\n }\n id\n }\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n ...NotificationItemCollectorProfileUpdatePrompt_notificationItem\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer on Viewer {\n notifications: notificationsConnection(first: 10) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" + "text": "query NotificationsList_test_Query {\n viewer {\n ...NotificationsList_viewer\n }\n}\n\nfragment NotificationItem_notification on Notification {\n id\n internalID\n headline\n message\n targetHref\n isUnread\n notificationType\n objectsCount\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n available\n expiresAt\n }\n }\n previewImages(size: 4) {\n internalID\n blurhashDataURL\n resized(height: 58, version: [\"main\", \"normalized\", \"larger\", \"large\"]) {\n srcSet\n }\n }\n title\n ...NotificationTypeLabel_notification\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationsList_viewer on Viewer {\n notifications: notificationsConnection(first: 10) {\n edges {\n node {\n internalID\n notificationType\n artworks: artworksConnection {\n totalCount\n }\n ...NotificationItem_notification\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n viewingRoomsConnection(first: 1) {\n totalCount\n }\n }\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n internalID\n id\n }\n }\n }\n id\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n" } }; })();