Skip to content

Add contacts and organizations resolvers

What does this MR do and why?

This MR is related to #350138 (closed) and #350137 (closed) and aims at adding support to filter the organizations and the contacts of a group.

Screenshots or screen recordings

example_video_org_cont_filter

How to set up and validate locally

  1. Enable the CRM feature on a root group (e.g.: Gitlab Org in GDK)
  2. Contacts and organizations should already be seeded, otherwise add some organizations and contacts
  3. Run this example GraphQL query to filter the contacts
fragment ContactFragment on CustomerRelationsContact {
  __typename
  id
  firstName
  lastName
  email
}


query {
  group(fullPath: "gitlab-org") {
    id
    contacts {
#    contacts(search: "Sc") {
#    contacts(state: active) {
      nodes {
        ...ContactFragment
      }
    }
  }
}
  1. Run this example GraphQL query to filter the organizations
fragment OrganizationFragment on CustomerRelationsOrganization {
  __typename
  id
  name
}

query {
  group(fullPath: "gitlab-org") {
    id
    organizations {
#    organizations(search: "br") {
#    organizations(state: active) {
      nodes {
        ...OrganizationFragment
      }
    }
  }
}

MR acceptance checklist

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

Edited by Marco Zille

Merge request reports