{"id":13558364,"url":"https://github.com/jayy-lmao/rust-graphql-docker","last_synced_at":"2025-10-27T18:30:49.580Z","repository":{"id":46028636,"uuid":"230243972","full_name":"jayy-lmao/rust-graphql-docker","owner":"jayy-lmao","description":"Scratch-Containerised Rust GraphQL-API using Dataloaders","archived":false,"fork":false,"pushed_at":"2021-11-19T02:58:13.000Z","size":108,"stargazers_count":94,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T07:31:51.388Z","etag":null,"topics":["actix-web","dataloaders","docker","graphql","graphql-server","juniper","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jayy-lmao.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-26T10:23:27.000Z","updated_at":"2024-05-06T03:36:59.000Z","dependencies_parsed_at":"2022-09-08T15:12:02.946Z","dependency_job_id":null,"html_url":"https://github.com/jayy-lmao/rust-graphql-docker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayy-lmao%2Frust-graphql-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayy-lmao%2Frust-graphql-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayy-lmao%2Frust-graphql-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayy-lmao%2Frust-graphql-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayy-lmao","download_url":"https://codeload.github.com/jayy-lmao/rust-graphql-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238536126,"owners_count":19488661,"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":["actix-web","dataloaders","docker","graphql","graphql-server","juniper","rust","rust-lang"],"created_at":"2024-08-01T12:04:54.765Z","updated_at":"2025-10-27T18:30:44.306Z","avatar_url":"https://github.com/jayy-lmao.png","language":"Rust","funding_links":[],"categories":["Rust","graphql"],"sub_categories":[],"readme":"# Dockerize Graphql Rust\n\n***More current version at https://github.com/jayy-lmao/rust-cult-graphql-server***\n\nThis project is currently for demonstrating the use of dataloaders in a rust-based graphql server.\nThis demo uses:\n\n- `actix-web` a high-performance webserver for rust https://www.techempower.com/benchmarks/\n- `juniper` a popular rust graphql framework https://github.com/graphql-rust/juniper\n- A dockerfile which creates a _from scratch_ minimal sized container\n- Cults (more to be added)\n\n\nThere are definitely some improvements to be made in db requests, pagination etc. Let me know if you spot anything you think is top-priority!\n\n## Running locally\n\nsimple as `docker-compose up`, crazy!\nThen navigate to http://localhost:8000/graphql\n\n## TODO\n\n- [x] DB connection\n- [x] Expose graphql\n- [ ] Mutations!\n  - [x] Create\n  - [ ] Update\n  - [ ] Delete\n- [ ] Context to later use in Dataloaders and Auth\n- [x] Dataloaders\n- [ ] Auth?\n- [ ] DB pool\n\n## Schema\n\n```graphql\ntype Cult {\n  id: Int!\n  name: String!\n  members: [Person!]!\n}\n\ntype Mutation {\n  createPerson(data: NewPerson!): Person!\n  createCult(data: NewCult!): Cult!\n}\n\ninput NewCult {\n  name: String!\n}\n\ninput NewPerson {\n  name: String!\n  cult: Int\n}\n\ntype Person {\n  id: Int!\n  name: String!\n  cult: Cult\n}\n\ntype Query {\n  personById(id: Int!): Person!\n  persons: [Person!]!\n  cultById(id: Int!): Cult!\n  cults: [Cult!]!\n}\n```\n\n## References\n\nOriginal Rest API \u0026 DB connection is inspired by:\nhttps://turreta.com/2019/09/21/rest-api-with-rust-actix-web-and-postgresql-part-3/\n\nGraphql setup is inspired by:\nhttps://www.freecodecamp.org/news/building-powerful-graphql-servers-with-rust/\n\nRust containerization initially inspired by:\nhttps://alexbrand.dev/post/how-to-package-rust-applications-into-minimal-docker-containers/\n\n## Other stuff\n\nIf you are ever looking at setting up a Redis pubsub for keeping multiple servers in sync; check out https://github.com/jayy-lmao/rust-chat-bb8-ws\n\nIf you want a more up-to-date version using *actix-web* and *async-graphql* see https://github.com/jayy-lmao/rust-cult-graphql-server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayy-lmao%2Frust-graphql-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayy-lmao%2Frust-graphql-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayy-lmao%2Frust-graphql-docker/lists"}