https://github.com/dcramer/tabletop-server
https://github.com/dcramer/tabletop-server
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dcramer/tabletop-server
- Owner: dcramer
- License: apache-2.0
- Created: 2018-09-03T20:07:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:53:13.000Z (over 2 years ago)
- Last Synced: 2025-02-06T11:18:57.940Z (4 months ago)
- Language: Python
- Size: 261 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tabletop-server
## Install
```shell
$ brew install postgresql
$ poetry install
$ createdb -E utf-8 tabletop
$ poetry run tabletop migrate
$ poetry run tabletop runserver
```## API
The API is a GraphQL implementation powered by Graphene. The endpoint is ``/graphql/``.
Authentication is done via the following:
1. Perform a login mutation:
```graphql
mutation{
login(email:"[email protected]", password:"bar"){
errors
ok
token
user {id, email, name}
}
}
```2. Capture the token in the response and send it with future requests:
```http
Authorization: Token {value}
```Here's a helpful app which lets you bind an auth header:
https://github.com/skevy/graphiql-app