Skip to content
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

[ONYX-454] feat(notifications/activity): expose artworks within PartnerShowOpenedActivity #5351

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dblandin
Copy link
Member

@dblandin dblandin commented Oct 16, 2023

ONYX-454

Artworks are currently exposed for SavedSearchHitActivity and ArtworkPublishedActivity events. While other types do not currently include artwork IDs within the events object_ids structure, we can utilize other data loaders to fetch associated artworks.

This also includes a switch to filterArtworksLoader which supports more filter params and is a bit more performant than artworksLoader, primarily due to our use of Elasticsearch under the hood.

…dActivity

Artworks are currently exposed for `SavedSearchHitActivity` and
`ArtworkPublishedActivity` events. While other types do not currently include
artwork IDs within the events `object_ids` structure, we can utilize other data
loaders to fetch associated artworks.

This also includes a switch to `filterArtworksLoader` which supports more
filter params and is a bit more performant than `artworksLoader`, primarily due
to our use of Elasticsearch under the hood.
@dblandin dblandin self-assigned this Oct 16, 2023
@dblandin
Copy link
Member Author

cc/ @olerichter00 @nickskalkin @anandaroop as a conversation starter.

It think the primary risk of this approach is that it'll make notificationsConnection resolution slower, especially if the query includes entries of these other types. This does however move to a more performant resolution of artworks, via filterArtworksConnection which might offset that concern.

This also intentionally picks out the first object of the activity entry, whether it's a show (or viewing room if this approach is expanded), and only includes artworks from that first object.

@anandaroop
Copy link
Member

Makes sense, and the tradeoff re: switching but also now using the more performant loader sounds plausible.

Since we can't predict net performance, we can always keep an eye on this DD entry.

@nickskalkin
Copy link
Contributor

looks good to me! I don't understand though why this change should make the query slower 🤔

@dblandin
Copy link
Member Author

looks good to me! I don't understand though why this change should make the query slower

I suppose you're right — this shouldn't be any slower than the current artworksConnection resolutions for artwork alert or artwork published events.

@olerichter00 olerichter00 changed the title feat(notifications/activity): expose artworks within PartnerShowOpenedActivity [ONYX-454] feat(notifications/activity): expose artworks within PartnerShowOpenedActivity Oct 18, 2023
@artsy-peril
Copy link
Contributor

artsy-peril bot commented Oct 18, 2023

Warnings
⚠️

The V2 schema in this PR has breaking changes with Force. Remember to update the Force schema if necessary.

Argument 'artistSeriesIDs: [String]' was removed from field 'Query.artworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'Artist.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'EntityWithFilterArtworksConnectionInterface.filterArtworksConnection'
Enum value 'ARTIST_SERIES' was removed from enum 'ArtworkAggregation'
Argument 'artistSeriesIDs: [String]' was removed from field 'Gene.filterArtworksConnection'
Input field 'artistSeriesIDs' was removed from input object type 'FilterArtworksInput'
Argument 'artistSeriesIDs: [String]' was removed from field 'Tag.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'ArtistSeries.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'Partner.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'Show.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'Fair.filterArtworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'MarketingCollection.artworksConnection'
Argument 'artistSeriesIDs: [String]' was removed from field 'Viewer.artworksConnection'

Generated by 🚫 dangerJS against 7de7144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants