Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aryaniyaps/python-graphql-relay-todos
Fully fledged todo application using Strawberry GraphQL, FastAPI, Relay and React
https://github.com/aryaniyaps/python-graphql-relay-todos
fastapi graphql graphql-relay postgresql python react relay relay-modern sqlalchemy strawberry-graphql
Last synced: 6 days ago
JSON representation
Fully fledged todo application using Strawberry GraphQL, FastAPI, Relay and React
- Host: GitHub
- URL: https://github.com/aryaniyaps/python-graphql-relay-todos
- Owner: aryaniyaps
- Created: 2024-06-20T11:37:41.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-01T03:32:17.000Z (5 months ago)
- Last Synced: 2024-07-06T00:10:22.227Z (5 months ago)
- Topics: fastapi, graphql, graphql-relay, postgresql, python, react, relay, relay-modern, sqlalchemy, strawberry-graphql
- Language: Python
- Homepage:
- Size: 3.49 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Python GraphQL Relay Todos
Fully fledged todo application using Strawberry GraphQL, FastAPI, Relay and React
[![codecov](https://codecov.io/gh/aryaniyaps/python-graphql-relay-todos/graph/badge.svg?token=QDIFFSG8MS)](https://codecov.io/gh/aryaniyaps/python-graphql-relay-todos)
https://github.com/aryaniyaps/python-graphql-relay-todos/assets/69184573/b6c7e0e9-14c7-4af4-9cf8-67dc28429a75
## Tech Stack:
Backend stack
- [Python](https://www.python.org/)
- [FastAPI](https://fastapi.tiangolo.com/)
- [Uvicorn](https://www.uvicorn.org/)
- [Strawberry GraphQL](https://strawberry.rocks/)
- [SQLAlchemy](https://www.sqlalchemy.org/)
- [Asyncpg](https://magicstack.github.io/asyncpg/current/)
- [Alembic](https://alembic.sqlalchemy.org/en/latest/)
- [Result](https://github.com/rustedpy/result)
- [AioInject](https://thirvondukr.github.io/aioinject/)
- [Structlog](https://www.structlog.org/en/stable/)
- [Pytest](https://docs.pytest.org/en/latest/)Frontend stack
- [TypeScript](https://www.typescriptlang.org/)
- [React](https://react.dev/)
- [Vite](https://vitejs.dev/)
- [TailwindCSS](https://tailwindcss.com/)
- [Shadcn UI](https://ui.shadcn.com/)
- [Relay](https://relay.dev/)
- [React Router DOM](https://reactrouter.com/en/main)
- [React Hook Form](https://react-hook-form.com/)
- [Zod](https://zod.dev/)## Features:
- Dependency Injection in resolvers
- Usage of dataloaders to resolve nodes
- Relay spec compliant GraphQL server
- Connection handling, including inserts, updates and deletions
- Usage of Relay Client and fragments
- Cursor paginated connections
- End to end GraphQL code generation
- Fully tested GraphQL server
- User facing errors modelled within the schema## Starting the project
1. setup docker compose
```
docker compose up
```
2. install server dependencies
```
cd server
pdm install
```3. setup database migrations
```
pdm run migrate
```4. start the server
```
pdm run dev
```5. install client dependencies
```
cd client
npm install
```
6. start the client
```
npm run dev
```## Generating the GraphQL schema
```
cd server
pdm run generate-schema
```## Running the Relay Compiler
```
cd client
npm run relay --watch
```