Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR deprecates the community picks feature by always rejecting submissions and returning default values. This ensures that old extensions cannot use the submission functionality while providing clear feedback about the deprecation.
Key changes:
- Simplify submission resolvers to always return rejection and default values
- Add deprecation annotations to GraphQL schema
- Update test cases to reflect the new behavior
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/schema/submissions.ts | Removes all submission logic and returns hardcoded rejection/default values with deprecation warnings |
| src/errors.ts | Adds new error message for deprecated community picks feature |
| tests/submissions.ts | Updates tests to verify deprecation behavior and removes obsolete test cases |
| """ | ||
| submitArticle(url: String!): SubmitArticle @auth | ||
| submitArticle(url: String!): SubmitArticle | ||
| @auth |
There was a problem hiding this comment.
The submitArticle mutation still requires authentication (@auth) but no longer uses the user context. Consider removing the @auth directive since the mutation now always returns rejection regardless of authentication status.
| @auth |
| ctx, | ||
| ), | ||
| // Feature deprecated, will be removed in the future | ||
| submitArticle: async (): Promise<GQLSubmitArticleResponse> => { |
There was a problem hiding this comment.
The submitArticle resolver removes the url parameter from the function signature but the GraphQL schema still defines it as required. This could cause runtime errors when clients pass the url parameter.
|
🍹 The Update (preview) for dailydotdev/api/prod (at ef26763) was successful. Resource Changes Name Type Operation
~ vpc-native-clean-zombie-user-companies-cron kubernetes:batch/v1:CronJob update
~ vpc-native-personalized-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-current-streak-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-public-threshold-cron kubernetes:batch/v1:CronJob update
~ vpc-native-clean-zombie-images-cron kubernetes:batch/v1:CronJob update
~ vpc-native-check-analytics-report-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-source-tag-view-cron kubernetes:batch/v1:CronJob update
~ vpc-native-calculate-top-readers-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-highlighted-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-sync-subscription-with-cio-cron kubernetes:batch/v1:CronJob update
+ vpc-native-api-migration-52156b43 kubernetes:batch/v1:Job create
~ vpc-native-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-ws-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-update-trending-cron kubernetes:batch/v1:CronJob update
~ vpc-native-generic-referral-reminder-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-views-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tag-recommendations-cron kubernetes:batch/v1:CronJob update
~ vpc-native-daily-digest-cron kubernetes:batch/v1:CronJob update
~ vpc-native-update-tags-str-cron kubernetes:batch/v1:CronJob update
~ vpc-native-temporal-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-validate-active-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-private-deployment kubernetes:apps/v1:Deployment update
~ vpc-native-clean-zombie-users-cron kubernetes:batch/v1:CronJob update
~ vpc-native-bg-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-55c1bde3 kubernetes:batch/v1:Job delete
~ vpc-native-clean-stale-user-transactions-cron kubernetes:batch/v1:CronJob update
|
Always return rejection and default values when trying to use community picks from old extensions.