• Chad Woolley's avatar
    Refactor spammable GraphQL mutations · f8e6797d
    Chad Woolley authored
    * Move the render_recaptcha? method to the Spammable concern,
      so it can be used from both the controllers and GraphQL
      mutations.
    * Refactor logic and method naming in mutation to make it
      explicit that the #resolve method's args parameter is
      being mutated before being passed to the service layer as
      params
    * Introduce ServiceCompatibility concern, to DRY up and
      abstract mutation-layer concerns related to processing
      graphql mutation field params to be compatible with those
      expected by the service layer
    * Rename SpammableMutationFields concern to CanMutateSpammable
      to be more consistently named with other concerns
    * Move and refactor the snippet_spam feature flag to be in the
      service layer, and be less coupled to the implementation
      details of spam checking.
    
    See https://gitlab.com/gitlab-org/gitlab/-/issues/217722
    for more details.
    f8e6797d
create.rb 2.99 KB