Skip to content

phacic/contacts_backend

Repository files navigation

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"
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages