• 
      

    Fix up the base classes for mutations.

    Review Request #9538 — Created Feb. 1, 2018 and submitted — Latest diff uploaded

    Information

    Django Evolution
    master
    d7a092f...

    Reviewers

    The class hierarchy for mutations was a mess. We had a few base classes
    (BaseMutation, MonoBaseMutation, and MutateModelField), with a
    hierarchy descending in that order. BaseMutation was the base class
    for all mutations. MonoBaseMutation was for models. MutateModelField
    was for fields on models. While the naming was inconsistent, that
    hierarchy made sense.

    There were a few problems, though. MutateModelField.mutate (the base
    mutate function for models) really belonged in MonoBaseMutation, and
    the lack of this made things pretty confusing. Worse, several of the
    mutations that worked on models (and not fields) were inheriting from
    MutateModelField.

    This change renames the base classes to BaseMutation,
    BaseModelMutation, and BaseModelFieldMutation, and fixes up the
    order they're listed in the field and moving
    BaseModelFieldMutation.mutate into BaseModelMutation. It also fixes
    up the specific mutations so that they all inherit from the correct
    base class.

    Unit tests pass.