Skip to content

Upload versioned designs through GraphQL

What does this MR do?

This allows uploading designs through GraphQL.

The mutation requires these arguments:

  • fullPath: The path in which we can find the issue for creating designs
  • iid: The iid of the issue in which to upload designs
  • files: An array of files. We expect these to be in the format used by apollo-upload-client which uses this spec for multipart fileupload.

The middleware used for handling the multipart upload an translating the variables is apollo_upload_server

When a file is uploaded, the basename is used for creating a design, when a design for the specified issue did not exist for the filename a new one is created. Otherwise the existing one is used.

When uploading a new file, a new version is created an linked to the design being updated or created.

The files are stored in a repository that lives next to the project repository with the path @hashed/[hash]/[to]/[repo].design.git. The files are not yet stored in LFS, but they should be.

The frontend using this is in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10655

What is not included

The raw endpoint that exposes the uploaded desings, I'll tackle that in a different MR.

What are the relevant issue numbers?

This is part of https://gitlab.com/gitlab-org/gitlab-ee/issues/9492

Does this MR meet the acceptance criteria?

Edited by Bob Van Landuyt

Merge request reports