Skip to content

fix: always reject submissions#2952

Merged
omBratteng merged 2 commits intomainfrom
fix-always-reject-submissions
Jul 30, 2025
Merged

fix: always reject submissions#2952
omBratteng merged 2 commits intomainfrom
fix-always-reject-submissions

Conversation

@omBratteng
Copy link
Contributor

Always return rejection and default values when trying to use community picks from old extensions.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
@auth

Copilot uses AI. Check for mistakes.
ctx,
),
// Feature deprecated, will be removed in the future
submitArticle: async (): Promise<GQLSubmitArticleResponse> => {
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@pulumi
Copy link

pulumi bot commented Jul 30, 2025

🍹 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

@omBratteng omBratteng merged commit 98fba6b into main Jul 30, 2025
9 checks passed
@omBratteng omBratteng deleted the fix-always-reject-submissions branch July 30, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants