Skip to content

Add field to query organizations for a given user

Thong Kuah requested to merge user_organizations_query into master

What does this MR do and why?

Related issue: #417892 (closed)

Add field to query organizations for a given user

This is released as Experimental as Organizations is still experimental

Changelog: changed

Screenshots or screen recordings

Screenshot_2023-11-06_at_5.16.28_PM

How to set up and validate locally

  1. Add an OrganizationUser record. In the rails console:

    Organizations::OrganizationUser.create!(organization_id: 1, user_id: 1)
  2. Run the following graphql query:

query{
  user(username: "root") {
    organizations {
      nodes {
        path
      }
    }
  }
}

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 Thong Kuah

Merge request reports