Skip to content

Deprecate and remove the remaining bucket key-based GraphQL/Liquid surface (phase 2 of dropping RegistrationPolicyBucket#key) #11896

Description

@nbudin

Background

Once #11895 lands, nothing in the frontend still needs to read or write RegistrationPolicyBucket#key (or the deprecated signup-side bucketKey/requestedBucketKey fields) as identity -- everything goes through id instead. This issue is the GraphQL-schema half: deprecate, then remove, the key-based surface that's no longer needed, so #11897 and #11898 can proceed without an external API still depending on it.

Concretely, the following are still live in the schema today:

  • Types::BucketKeyMappingInputType (app/graphql/types/bucket_key_mapping_input_type.rb): from_key/to_key arguments, both already deprecation_reason-marked in favor of from_bucket_id/to_bucket_id.
  • Deprecated bucketKey/requestedBucketKey fields on Types::SignupType, Types::SignupRequestType, Types::SignupRankedChoiceType, Types::SignupChangeType.
  • Deprecated bucket_key/requested_bucket_key mutation arguments on Mutations::CreateMySignup, Mutations::CreateUserSignup, Mutations::CreateSignupRequest, Mutations::CreateSignupRankedChoice, Mutations::ForceConfirmSignup, Mutations::UpdateSignupBucket.
  • Types::RegistrationPolicyBucketType#key (app/graphql/types/registration_policy_bucket_type.rb) -- the bucket's own read field, not currently marked deprecated at all. Convert remaining registration policy bucket key dependencies (SignupBucketFinder, EventChangeRegistrationPolicyService) to id #11892's research found no Liquid template usage of the equivalent RegistrationPolicy::BucketDrop#key field; this issue is about the GraphQL field specifically, which Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895's frontend conversion makes unused by this codebase's own frontend (though it's a public field on a public API -- see Tradeoffs).
  • RegistrationPolicy::BucketDrop#key (app/liquid_drops/registration_policy/bucket_drop.rb) -- confirmed zero real-world usage across ~170 conventions' Page/CmsPartial/CmsLayout/NotificationTemplate/Product content in a full-text search.

Also found along the way, and unrelated to any of this except by proximity: Types::RegistrationPolicyInputType/Types::RegistrationPolicyBucketInputType (with a required: true key argument) are referenced by no mutation argument and no frontend query at all -- dead code, safe to delete independently of everything else in this plan.

Proposed Change

  1. Remove from_key from BucketKeyMappingInputType -- fully covered by from_bucket_id, since a removed bucket is always a persisted row with a real id already (unlike a bucket being newly created in the same edit, which to_key still needs to cover).
  2. Deprecate, then (after your normal deprecation window) remove: the bucketKey/requestedBucketKey fields on the four Signup-family GraphQL types, the bucket_key/requested_bucket_key mutation arguments on the six mutations listed above, and RegistrationPolicyBucketType#key.
  3. Remove RegistrationPolicy::BucketDrop#key's delegate.
  4. Delete the dead RegistrationPolicyInputType/RegistrationPolicyBucketInputType types.
  5. Run bin/rails graphql:update and commit the regenerated schema/generated frontend files, per this repo's CLAUDE.md.

Benefits

Tradeoffs

  • Steps 1-3 are breaking API changes to a schema that (per this repo's model) may have external consumers beyond this codebase's own frontend. Needs whatever deprecation-window/versioning process this project normally applies before removing a deprecated field -- this issue is scoped to include both the deprecation and the eventual removal, but the removal step shouldn't happen until that window has passed.
  • RegistrationPolicyBucketType#key isn't currently marked deprecation_reason at all, so removing it has a longer runway to plan for than the fields that are already deprecated.

References


Issue drafted by Claude

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions