Add graphql Api for Snippet Replication
What does this MR do?
Add graphQL endpoints for snippet repository replication
This was added following https://docs.gitlab.com/ee/development/geo/framework.html#graphql-api
Relates to #263792 (closed)
Database
We don't have data on this in production or staging yet, so I'm testing it locally.
Query:
SELECT "snippet_repository_registry".*
FROM "snippet_repository_registry"
WHERE "snippet_repository_registry"."id" IN (6, 4)
ORDER BY "snippet_repository_registry"."id" ASC
I generated 100000 rows in my local development box and ran a query plan:
QUERY PLAN
-----------------------------------------------------------------------------------------------------
Sort (cost=16.34..16.34 rows=2 width=78)
Sort Key: id
-> Bitmap Heap Scan on snippet_repository_registry (cost=8.60..16.33 rows=2 width=78)
Recheck Cond: (id = ANY ('{6,4}'::bigint[]))
-> Bitmap Index Scan on snippet_repository_registry_pkey (cost=0.00..8.60 rows=2 width=0)
Index Cond: (id = ANY ('{6,4}'::bigint[]))
(6 rows)
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 Alex Ives