Untone 8d410fcac3
Some checks failed
Deploy on push / type-check (push) Failing after 34s
Deploy on push / deploy (push) Has been skipped
312
2025-06-03 01:03:58 +03:00
312
2025-06-03 01:03:58 +03:00
2025-06-03 00:58:07 +03:00
2025-06-02 22:28:17 +03:00
2025-06-03 00:50:39 +03:00
2025-06-02 22:40:10 +03:00
2025-06-02 22:40:10 +03:00
2025-06-02 21:50:58 +03:00
2024-02-19 16:29:05 +03:00
..
2024-11-14 14:00:33 +03:00
2025-06-02 03:00:40 +03:00
2024-02-21 23:12:47 +03:00
311
2025-06-03 01:01:45 +03:00
2025-06-03 00:50:39 +03:00
2025-05-16 10:30:02 +03:00
2025-05-21 01:34:02 +03:00
2025-06-02 22:40:10 +03:00
2025-06-02 23:28:53 +03:00
2025-06-02 21:50:58 +03:00
2025-05-16 10:30:02 +03:00
2025-05-16 10:30:02 +03:00

GraphQL API Backend

Backend service providing GraphQL API for content management system with reactions, ratings and comments.

Core Features

Shouts (Posts)

  • CRUD operations via GraphQL mutations
  • Rich filtering and sorting options
  • Support for multiple authors and topics
  • Rating system with likes/dislikes
  • Comments and nested replies
  • Bookmarks and following

Reactions System

  • ReactionKind types: LIKE, DISLIKE, COMMENT
  • Rating calculation for shouts and comments
  • User-specific reaction tracking
  • Reaction stats and aggregations
  • Nested comments support

Authors & Topics

  • Author profiles with stats
  • Topic categorization and hierarchy
  • Following system for authors/topics
  • Activity tracking and stats
  • Community features

Tech Stack

Development

Prepare environment:

mkdir .venv
python3.12 -m venv venv
source venv/bin/activate

Run server

First, certifcates are required to run the server.

mkcert -install
mkcert localhost

Then, run the server:

python -m granian main:app --interface asgi

Useful Commands

# Linting and import sorting
ruff check . --fix --select I

# Code formatting
ruff format . --line-length=120

# Run tests
pytest

# Type checking
mypy .

# dev run
python -m granian main:app --interface asgi

Code Style

We use:

  • Ruff for linting and import sorting
  • Line length: 120 characters
  • Python type hints
  • Docstrings for public methods

GraphQL Development

Test queries in GraphQL Playground at http://localhost:8000:

# Example query
query GetShout($slug: String) {
  get_shout(slug: $slug) {
    id
    title
    main_author {
      name
    }
  }
}
Description
ядро платформы
Readme MIT 12 MiB
Languages
Python 74.6%
TypeScript 19.2%
CSS 6.1%