Skip to content

Swap mock GraphQL query for the real in organizations list

What does this MR do and why?

Related to #428479 (closed)

The grouptenant scale team is starting to build out an Organization MVC. For more information about what an "Organization" will be see https://docs.gitlab.com/ee/architecture/blueprints/organization/

In Organization list view in "Your work" - build list (#417876 - closed) we built the organizations list but used a mock GraphQL query because the real one wasn't available yet. Now that GraphQL query for listing a user's organizations (#417892 - closed) has been closed we have access to the real query. This MR swaps the mock query for the real one.

Notes

  • Organizations do not yet support avatars. Those will be added in #422418 (closed). The frontend supports avatars so when the API is updated the frontend will render the avatar without any additional changes.
  • Organizations do not yet support a description field. Those will be added in #422078 (closed). The frontend supports rendering descriptions so when the API is updated the frontend will render the description without any additional changes.

Screenshots or screen recordings

127.0.0.1_3000_-_organizations

How to set up and validate locally

  1. Open the rails console
    • bin/rails console
  2. Generate some organizations and add yourself as a user (below code assumes you are signed in as root user)
50.times do
   name = FFaker::Company.name
   organization = Organizations::Organization.create(name: name, path: name.parameterize)
   Organizations::OrganizationUser.create!(organization_id: organization.id, user_id: User.find_by_username('root').id)
end
  1. Enable the :ui_for_organizations feature flag
    • Feature.enable(:ui_for_organizations)
  2. Navigate to /-/organizations

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 Peter Hegman

Merge request reports

Loading