feat: add hasUnreadPosts flag and clearUnreadPosts mutation#2956
feat: add hasUnreadPosts flag and clearUnreadPosts mutation#2956omBratteng merged 16 commits intomainfrom
Conversation
|
🍹 The Update (preview) for dailydotdev/api/prod (at cdfa2f4) was successful. Resource Changes Name Type Operation
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-hourly-notification-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-ws-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-generate-search-invites-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-gifted-plus-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-migration-02fbdf86 kubernetes:batch/v1:Job create
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
+ api-sub-api.post-added-squad-unread-posts gcp:pubsub/subscription:Subscription create
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
+- vpc-native-debezium-deployment kubernetes:apps/v1:Deployment create-replacement
- vpc-native-api-migration-7a7a5afe kubernetes:batch/v1:Job delete
+- vpc-native-debezium-props kubernetes:core/v1:Secret create-replacement
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-trending-cron kubernetes:batch/v1:CronJob update
|
capJavert
left a comment
There was a problem hiding this comment.
Looks good, just few comments to check after you add tests 👍
src/schema/sources.ts
Outdated
| }, | ||
| ); | ||
|
|
||
| return getSourceById(ctx, info, sourceId); |
There was a problem hiding this comment.
Do we need to return whole source, seems it can return empty response?
There was a problem hiding this comment.
Yeah agreed we don't use it right? so empty probably easier.
There was a problem hiding this comment.
I use it in frontend to update query state for the squad
There was a problem hiding this comment.
I've refactored it now to be a smaller mutation, it just returns true or false depending on affected rows in the update.
Then on front-end, if response is true, I update object
rebelchris
left a comment
There was a problem hiding this comment.
Nothing blocking from my side.
src/schema/sources.ts
Outdated
| }, | ||
| ); | ||
|
|
||
| return getSourceById(ctx, info, sourceId); |
There was a problem hiding this comment.
Yeah agreed we don't use it right? so empty probably easier.
Co-authored-by: Ante Barić <ante@kickass.website>
Co-authored-by: Ante Barić <ante@kickass.website>
rebelchris
left a comment
There was a problem hiding this comment.
Nothing blocking from my side.
Would prefer optimized mutation, but it's not a blocker.
TODO:
Jira ticket
AS-1172