{"id":13879369,"url":"https://github.com/jetruby/apollo_upload_server-ruby","last_synced_at":"2025-05-15T15:05:15.288Z","repository":{"id":45561887,"uuid":"115114829","full_name":"jetruby/apollo_upload_server-ruby","owner":"jetruby","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-17T08:14:23.000Z","size":55,"stargazers_count":179,"open_issues_count":12,"forks_count":50,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T16:13:25.716Z","etag":null,"topics":["graphql","middleware","rails","ruby","upload"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jetruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-22T12:48:23.000Z","updated_at":"2025-03-10T20:28:12.000Z","dependencies_parsed_at":"2024-05-17T09:28:20.948Z","dependency_job_id":"cc604b7c-c59a-4c82-9556-c561151708fa","html_url":"https://github.com/jetruby/apollo_upload_server-ruby","commit_stats":{"total_commits":59,"total_committers":23,"mean_commits":"2.5652173913043477","dds":0.576271186440678,"last_synced_commit":"b214e456885542dbc410324cdce4b31c6a068b51"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetruby%2Fapollo_upload_server-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetruby%2Fapollo_upload_server-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetruby%2Fapollo_upload_server-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetruby%2Fapollo_upload_server-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jetruby","download_url":"https://codeload.github.com/jetruby/apollo_upload_server-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694875,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","middleware","rails","ruby","upload"],"created_at":"2024-08-06T08:02:18.685Z","updated_at":"2025-04-07T17:07:02.697Z","avatar_url":"https://github.com/jetruby.png","language":"Ruby","readme":"# ApolloUploadServer\n\nMiddleware which allows you to upload files using [graphql-ruby](https://github.com/rmosolgo/graphql-ruby), [apollo-upload-client](https://github.com/jaydenseric/apollo-upload-client) and Ruby on Rails.\n\nNote: this implementation uses [v2 of the GraphQL multipart request spec](https://github.com/jaydenseric/graphql-multipart-request-spec/tree/v2.0.0-alpha.2), so you should use apollo-upload-client library \u003e= v7.0.0-alpha.3. If you need support for [v1 of the GraphQL multipart request spec](https://github.com/jaydenseric/graphql-multipart-request-spec/tree/v1.0.0), you must\nuse [version 1.0.0](https://github.com/jetruby/apollo_upload_server-ruby/tree/1.0.0) of this gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'apollo_upload_server', '2.1'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install apollo_upload_server\n\nMiddleware will be used automatically.\n\nGem adds custom `Upload` type to your GraphQL types.\nUse `ApolloUploadServer::Upload` type for your file as input field:\n\n```ruby\n  input_field :file, ApolloUploadServer::Upload\n```\n\nThat's all folks!\n\n## Configuration\n\nThe following configuration options are supported:\n\n### Strict Mode\n\nThis can be set on `ApolloUploadServer::Middleware`:\n\n```ruby\nApolloUploadServer::Middleware.strict_mode = true\n```\n\nDoing so ensures that all mapped array values are present in the input. If this\nis set to `true`, then for following request:\n\n```json\n{\n  \"operations\": {\n    \"query\": \"mutation { ... }\",\n    \"operationName\": \"SomeOperation\",\n    \"variables\": {\n      \"input\": { \"id\": \"123\", \"avatars\": [null, null] }\n    }\n  }\n}\n```\n\nA mapping for `variables.input.avatars.0` or `variables.input.avatars.1`, will work, but one for\n`variables.input.avatars.100` will not, and will raise an error.\n\nIn strict mode, passing empty destination arrays will always fail.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/jetruby/apollo_upload_server-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\nTests can be run via `bundle exec rspec`.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the ApolloUploadServer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jetruby/apollo_upload_server-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n## About JetRuby\n\nApolloUploadServer is maintained and founded by JetRuby Agency.\n\nWe love open source software!\nSee [our projects][portfolio] or\n[contact us][contact] to design, develop, and grow your product.\n\n[portfolio]: http://jetruby.com/portfolio/\n[contact]: http://jetruby.com/#contactUs\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetruby%2Fapollo_upload_server-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetruby%2Fapollo_upload_server-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetruby%2Fapollo_upload_server-ruby/lists"}