Skip to content

gitlab_schema.json is too big for code review, and browsing

doc/api/graphql/reference/gitlab_schema.json is now 1MB file.

Screen_Shot_2020-09-07_at_8.57.39_AM

GitLab now refuses to expand that file by default.

We also have problems with bad merges in !42543 (merged) , and !42590 (merged)

Proposal

Serve gitlab_schema.json and gitlab_schema.graphql from main rails app.

  • Use asset pipeline, or a rake task that is called from asset pipeline to generate these files
  • In development environment, it will generate the files and serve them from a cache.
  • For CI, generate from setup-test-env too so that front end tests can continue to use them
  • And that we stop checking in these two files at doc/api/graphql/reference/gitlab_schema.json
  • (Nice to have) we should establish some kind of reporting similar to the webpack chunk size to monitor that the size of gitlab_schema.json doesn't balloon out of control

Other proposals considered

  • Break gitlab-schema.json into a directory of files. One file per object ?
  • Alternatively, we can stop committing this file in (This is similar to #28274), and serve from docs site.
Edited by Thong Kuah