-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: add user seen artworks mutation #6443
Conversation
59f8658
to
9cfedf7
Compare
9cfedf7
to
d8bbc87
Compare
ResolverContext | ||
>({ | ||
name: "CreateUserSeenArtwork", | ||
description: "Creates User Seen Artwork.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I would add more human description, like "Marks an artwork as seen when a user swipes through Infinite Discovery"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 just one small question
} | ||
|
||
const createUserSeenArtworkLoaderPayload = Object.keys(args) | ||
.filter((key) => key !== "id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: not sure if I understand what it does. Could we just call createUserSeenArtworkLoader({ artwork_id: args.artworkId})
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It simply converts non-ID parameters to snake_case. Since it's used in other mutations, I thought it would be good to follow this utility for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@@ -18,6 +19,11 @@ export const DiscoverArtworks: GraphQLFieldConfig<void, ResolverContext> = { | |||
type: new GraphQLList(GraphQLString), | |||
description: "Exclude these artworks from the response", | |||
}, | |||
useInternalTracking: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egdbear sudden idea — let's instead of this param use an ENV var in line number 61? This way backend will be able to control behavior without frontend changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that is necessary if we add this change to Eigen?
This PR introduces a new mutation, createUserSeenArtwork, which will be used to track seen artworks for Infinite Discovery. Gravity PR that introduced the endpoint for tracking seen artworks.
Ticket DIA-1155