{"id":15498561,"url":"https://github.com/aaronleopold/axum-graphql-prisma","last_synced_at":"2026-03-12T11:04:44.388Z","repository":{"id":113933869,"uuid":"483443620","full_name":"aaronleopold/axum-graphql-prisma","owner":"aaronleopold","description":"A template for creating services in Rust using Axum and Prisma.","archived":false,"fork":false,"pushed_at":"2023-04-24T00:38:04.000Z","size":66,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T13:32:55.360Z","etag":null,"topics":["axum","graphql","graphql-rust","prisma","prisma-client-rust","rust"],"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/aaronleopold.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-19T23:43:33.000Z","updated_at":"2024-01-29T13:38:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9a99102-da4c-4d4d-8da4-4486b8a67503","html_url":"https://github.com/aaronleopold/axum-graphql-prisma","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronleopold%2Faxum-graphql-prisma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronleopold%2Faxum-graphql-prisma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronleopold%2Faxum-graphql-prisma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronleopold%2Faxum-graphql-prisma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronleopold","download_url":"https://codeload.github.com/aaronleopold/axum-graphql-prisma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333578,"owners_count":21413415,"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":["axum","graphql","graphql-rust","prisma","prisma-client-rust","rust"],"created_at":"2024-10-02T08:46:19.937Z","updated_at":"2026-03-12T11:04:44.336Z","avatar_url":"https://github.com/aaronleopold.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust + Axum + Prisma\n\nA template for creating services in Rust using Axum and Prisma. This uses the super cool [Prisma Rust Client](https://github.com/Brendonovich/prisma-client-rust).\n\n## Getting Started\n\nYou'll want to have `cargo-watch` installed for the best DX, however it isn't required.\n\n```bash\ncargo install cargo-watch\n```\n\nThen you can run the `cargo-watch -x run` command to watch for changes and automatically rebuild the project.\n\n## Prisma\n\nTo set up prisma, run:\n\n```bash\ncargo prisma generate # outputs client to src/prisma.rs\ncargo prisma db push # outputs sqlite db to prisma/dev.db (specified in schema.prisma)\ncargo seed # seeds the database with some data (unimplemented, create a seed based on your needs)\n```\n\nFor more in-depth information about the prisma client, see the [Prisma Client Rust Docs](https://github.com/Brendonovich/prisma-client-rust/tree/main/docs).\n\n## Run the Server\n\nTo run the server, run:\n\n```bash\ncargo run # or cargo-watch -x run\n```\n\n## GraphQL Playground\n\nGo to [localhost:8080/api/graphql](http://localhost:8080/api/graphql) to see the playground. You can see the schema and the docs, but a few examples would be:\n\n```graphql\n# Create user\nmutation {\n  createUser(input: { displayName: \"oromei\" }) {\n    id\n  }\n}\n\n# Create post\nmutation {\n  createPost(\n    input: {\n      content: \"Woah there!\"\n      userId: \"5ab80953-c38c-4ec8-8b4b-3ecc4bc1196f\"\n    }\n  ) {\n    id\n    content\n    user {\n      displayName\n    }\n  }\n}\n\n# Get all users\nquery {\n  getUsers {\n    id\n    displayName\n  }\n}\n\n# Get all posts\nquery {\n  getPosts {\n    id\n    content\n    user {\n      displayName\n    }\n  }\n}\n```\n\n## Notes\n\nThis template uses Axum, but the bulk of the setup is for async_graphql + prisma. You should be able to easily swap out Axum for your preferred framework (e.g. Rocket, actix, etc).\n\nThe simple use of async_graphql means that queries are done in a less efficient manner than could be, since fetching relations using `with` is never utilized and relations are loaded separately. Additionally, dataloader is not utilized because I can't be bothered.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronleopold%2Faxum-graphql-prisma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronleopold%2Faxum-graphql-prisma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronleopold%2Faxum-graphql-prisma/lists"}