Skip to content

GraphQL query for listing a user's organizations

We will need a GraphQL query to list all the organizations that a user has access to. This will be used for #417876 (closed)

Designs

For context this API will be used for this UI

#410343 (closed)

https://gitlab.com/gitlab-org/gitlab/uploads/1f7ed6d1905abdbb9bf2438cc7b91073/Your_work_-_Organizations.png

Implementation guide

Add an organizations field to app/graphql/types/user_interface.rb and create a resolver: Resolvers::Users::OrganizationsResolver and a finder: Organizations::UserOrganizationsFinder` to find the organizations where the current user has access.

organizations will be of type: an array of Organizations::OrganizationType. OrganizationType is introduced in !128733 (diffs).

Edited by Abdul Wadood