Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.15 KB

README.md

File metadata and controls

67 lines (42 loc) · 1.15 KB

Imports: isort

Contacts Backend

Based on Google Contacts app on Android, this is supposed to the backend that supports such app. Supports both REST and GraphQL endpoints.

Dev

You will need docker installed to run.

docker-compose up

The server should be running on http://localhost:7770.

Open API docs on http://localhost:7770/docs

API docs on http://localhost:7770/api/v1

GraphQL on http://localhost:7770/graphql/v1

Models and Migration

Create migration files

docker-compose run --rm web aerich migrate --name "description"

Upgrade/downgrade from migration database

docker-compose run --rm web aerich upgrade/downgrade

login to db

psql -h db -U postgres

Testing

dc run --rm web pytest

GraphQL

Register

Login

mutation ($input: LoginInput!) {
  login(inputData: $input) {
    success
    accessToken
    tokenType
    error {
      text
      code
      description
    }
  }

=======
{
  "input": {
    "username": "[email protected]",
    "password": "examples"
  }
}