Skip to content

Fix GraphQL API for clearing issue contacts

What does this MR do and why?

Fix GraphQL API for clearing issue contacts

The API was handling: adding, removing and setting a new list, but not setting an empty list (e.g. clearing/removing all).

Changelog: fixed

Screenshots or screen recordings

Before:

image

After:

image

How to set up and validate locally

  1. Create an issue in the project
  2. Enable CRM
  3. Create a test contact
  4. Add a new contact to the issue
  5. Run the below GraphQL query https://gdk.test:3000/-/graphql-explorer
    mutation {
      issueSetCrmContacts(input: {
        projectPath: "flightjs/mood-test"
        iid: "1"
        contactIds: []
        operationMode: REPLACE
      }) {
        errors
        issue {
          customerRelationsContacts {
            nodes {
              firstName
            }
          }
        }
      }
    }

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #427038 (closed)

Merge request reports