BE: Add type field to UserCore
What does this MR do and why?
Background: The user contribution mapping epic introduced placeholder user mapping in the direct transfer process. That is, when a group is imported existing user contributions on issues, MRs, etc. are automatically assigned to placeholder users, after which the user triggering the transfer will map existing users to their matching placeholder user. In the recent bug, these placeholder user is appearing in dropdowns. The frontend needs to filter out users that are placeholder 'bot' users from actual users when assigning an owner to an issue, etc.
The current MR adds a type field to the User type in the graphql schema, whose value will be one of possible enum values already defined here.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the experiment fully
Feature.enable(:bulk_import_importer_user_mapping)
-
Visit graphiql (GDK should be running)
http://127.0.0.1:3000/-/graphql-explorer
-
Query the user endpoint:
query { user(username: "root") { type } }
Related to #505554 (closed)