Expose epic boards in GraphQL API
What does this MR do?
This is the first step in exposing epic boards through GraphQL, board lists will be added in a follow-up MR. No changelog is added because this is behind a feature flag.
Related to #233436 (closed)
DB queries
this is a new table which is not available on database-lab yet, so here is the output from local deployment:
Listing all boards:
gitlabhq_development=# explain analyze SELECT "boards_epic_boards".* FROM "boards_epic_boards" WHERE "boards_epic_boards"."group_id" = 9970 ORDER BY LOWER("boards_epic_boards"."name") ASC, "boards_epic_boards"."id" ASC LIMIT 100;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=12.69..12.70 rows=4 width=98) (actual time=0.104..0.106 rows=0 loops=1)
-> Sort (cost=12.69..12.70 rows=4 width=98) (actual time=0.101..0.103 rows=0 loops=1)
Sort Key: (lower(name)), id
Sort Method: quicksort Memory: 25kB
-> Bitmap Heap Scan on boards_epic_boards (cost=4.18..12.65 rows=4 width=98) (actual time=0.035..0.036 rows=0 loops=1)
Recheck Cond: (group_id = 9970)
-> Bitmap Index Scan on index_boards_epic_boards_on_group_id (cost=0.00..4.18 rows=4 width=0) (actual time=0.032..0.032 rows=0 loops=1)
Index Cond: (group_id = 9970)
Planning Time: 0.157 ms
Execution Time: 0.172 ms
Finding board by ID:
gitlabhq_development=# explain analyze SELECT "boards_epic_boards".* FROM "boards_epic_boards" WHERE "boards_epic_boards"."group_id" = 9970 AND "boards_epic_boards"."id" = 1 ORDER BY LOWER("boards_epic_boards"."name") ASC, "boards_epic_boards"."id" ASC LIMIT 1;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=8.18..8.19 rows=1 width=98) (actual time=0.034..0.036 rows=0 loops=1)
-> Sort (cost=8.18..8.19 rows=1 width=98) (actual time=0.032..0.033 rows=0 loops=1)
Sort Key: (lower(name))
Sort Method: quicksort Memory: 25kB
-> Index Scan using boards_epic_boards_pkey on boards_epic_boards (cost=0.15..8.17 rows=1 width=98) (actual time=0.025..0.025 rows=0 loops=1)
Index Cond: (id = 1)
Filter: (group_id = 9970)
Rows Removed by Filter: 1
Planning Time: 0.180 ms
Execution Time: 0.081 ms
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Jan Provaznik