Upload Versioned designs through GraphQL
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[0] which uses this spec[1] for multipart fileupload. The middleware used for handling the multipart upload an translating the variables is apollo_upload_server[2] 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. 0: https://github.com/jaydenseric/apollo-upload-client 1: https://github.com/jaydenseric/graphql-multipart-request-spec 2: https://github.com/jetruby/apollo_upload_server-ruby
Showing
... | ... | @@ -82,6 +82,7 @@ gem 'rack-cors', '~> 1.0.0', require: 'rack/cors' |
# GraphQL API | ||
gem 'graphql', '~> 1.8.0' | ||
gem 'graphiql-rails', '~> 1.4.10' | ||
gem 'apollo_upload_server', '~> 2.0.0.beta3' | ||
# Disable strong_params so that Mash does not respond to :permitted? | ||
gem 'hashie-forbidden_attributes' | ||
... | ... |
Please register or sign in to comment