https://github.com/omnidotdev/template-poem
📜 Poem template
https://github.com/omnidotdev/template-poem
Last synced: about 2 months ago
JSON representation
📜 Poem template
- Host: GitHub
- URL: https://github.com/omnidotdev/template-poem
- Owner: omnidotdev
- License: apache-2.0
- Created: 2025-06-26T20:37:20.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2026-03-31T17:08:26.000Z (2 months ago)
- Last Synced: 2026-04-06T03:37:18.001Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 42 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 📜 Poem GraphQL API Template
This is a template repository for a GraphQL API built with [Poem](https://github.com/poem-web/poem) and [async-graphql](https://github.com/async-graphql/async-graphql) in Rust.
## Features
- 🚀 **Modern Stack**: Built with Rust 2024 edition for performance and safety
- 📊 **GraphQL API**: [async-graphql](https://docs.rs/async-graphql) with Poem integration
- 🔭 **Observability**: OpenTelemetry tracing built-in
- ⚠️ **Error Handling**: [thiserror](https://docs.rs/thiserror) for custom error types
- 🔒 **Safety**:
- Unsafe code forbidden via lint
- Strict Clippy lints (pedantic, nursery, cargo)
- ⚡ **Optimized Builds**:
- LTO (Link-Time Optimization) enabled
- Single codegen unit for maximum optimization
- Binary stripping for smaller size
- Panic abort for reduced binary size
- 🛠️ **Developer Experience**:
- Comprehensive Clippy configuration
- Cargo metadata for crates.io publishing
- Easy spin up with [Tilt](https://tilt.dev)
## Prerequisites
- [Rust](https://rustup.rs) 1.85+
## Local Development
### Installation
```sh
cargo build
```
### Running
```sh
cargo run
```
The server starts at `http://0.0.0.0:3000` with GraphQL endpoint at `/graphql`.
### Testing
```sh
cargo test
```
### Linting
```sh
cargo clippy
```
## GraphQL
Query the GraphQL endpoint:
```sh
curl -X POST http://localhost:3000/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{ hello }"}'
```
## License
The code in this repository is licensed under Apache 2.0, © [Omni LLC](https://omni.dev). See [LICENSE.md](LICENSE.md) for more information.