Uploaded image for project: 'Evergreen'
  1. Evergreen
  2. EVG-15849

Refactor updateUserSettings mutation to accept partial updates.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: ui
    • Labels:

      Description

      Right now the updateUserSettings mutation requires that you pass in the entire userSettings object in order to update a field Otherwise it will overwrite the unchanged fields. It should instead only update the fields that were passed in and preserve the rest.

      This mutation should also return an object with the applied changes so we can make effective usage of the apollo cache. instead of calling refetchQueries.

      https://github.com/evergreen-ci/spruce/blob/373f8d96995bb8763873c32682f6039691fd5575/src/pages/preferences/preferencesTabs/NewUITab.tsx

      https://github.com/evergreen-ci/evergreen/blob/d6889a75eacbfad076d95b00cda3e40331242aaf/graphql/resolvers.go#L2754

        Attachments

          Activity

            People

            Assignee:
            backlog-server-evg Backlog - Evergreen Team
            Reporter:
            mohamed.khelif Mohamed Khelif
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: