Fix bin/seed by setting first parameter in GraphQL query
After the security fix bin/seed is no longer working which blocks deploys.
This MR fixes bin/seed. You can run bin/seed on main to reproduce the bug.
The complexity of the query in BlobApi is now above 200 which is causing the request to fail.
From slack I learned that adding first: xx will reduce the complexity even though the same data is returned.
This can be verified with the curl command below. You can also see that the query complexity is 170 instead of 610.
If you remove the line first: 20, it will fail:
curl -X POST https://gitlab.com/api/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "{\n queryComplexity {\n limit\n score\n }\n project(fullPath: \"gitlab-org/gitlab\") {\n repository {\n blobs(\n first: 20,\n paths: [\n \"config/events/1643968255_projectsnew_select_deployment_target.yml\",\n \"config/events/1647273260_projectsclustersindex_open_modal.yml\",\n \"config/events/1647273493_projectsclustersindex_click_button.yml\",\n \"config/events/1649272430_projectsnew_visit_docs.yml\",\n \"config/events/1651053267_event_create_service_project_action.yml\",\n \"config/events/1651580551_groups_controller_show_render.yml\",\n \"config/events/1651581659_projects_controller_show_render.yml\",\n \"config/events/1654698269_merge_request_action_create.yml\",\n \"config/events/1654698359_merge_request_action_close.yml\",\n \"config/events/1654698407_merge_request_action_merge.yml\",\n \"config/events/1654843786_merge_request_action_comment.yml\",\n \"config/events/1655179428_design_actions_create_.yml\",\n \"config/events/1655179485_design_actions_update_.yml\",\n \"config/events/1655179517_design_actions_destroy_.yml\",\n \"config/events/1655281022_i_search_total.yml\",\n \"config/events/1655841083_projects_settings_cicd_show_render.yml\",\n \"config/events/1655841352_projects_settings_cicd_show_upload.yml\",\n \"config/events/1655841364_projects_settings_cicd_show_delete.yml\",\n \"config/events/1658833247_integrations_class_perform_integrations_action.yml\",\n \"config/events/1659067369_issue_actions_perform_issue_acitons_.yml\"\n ]\n ) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n id\n name\n webPath\n rawBlob\n }\n }\n }\n }\n }\n}"
}' | jq .
Relates to #87 (closed)
Edited by Jonas Larsen