Sign inSign up

jhonsfran/unisoftware-api

By jhonsfran

•Updated about 6 years ago

Image
0

1.4K

jhonsfran/unisoftware-api repository overview

⁠Requirements
  • Python >= 3.7
⁠Installation
  • clone the repo
  • create virtual env -> python -m venv virtualenv
  • activate virtual env -> depends on SO / windows -> source virtualenv/Scripts/activate
  • install requirements -> pip install -r requirements.txt
  • run migrations -> python manage.py makemigrations && python manage.py migrate
  • create a super user -> python manage.py createsuperuser
  • load sample data -> python manage.py loaddata programaacademico
  • run server -> python manage.py runserver

⁠GraphQl

This repo is the api service of unisoftware. The api expose a graphql endpoint to manage all requests. To start debuging you better install the chrome extension called Altair GraphQL because the default debuger is too primitive.

open graphQL endpoint⁠. If everything goes well go to the Altair extension and set the endpoint to http://localhost:8000/graphql⁠

⁠Generate token

First at all you need to create a token to execute queries and mutations so follow the steps bellow and use your user info created in the installation step.

GraphQl Example

⁠Follow the docs of our core libraries to more info.

⁠To delete when you break the migrations

https://stackoverflow.com/questions/33259477/how-to-recreate-a-deleted-table-with-django-migrations⁠

⁠Init revisions

python manage.py migrate python manage.py createinitialrevisions

Tag summary

Content type

Image

Digest

Size

89.5 MB

Last updated

about 6 years ago

docker pull jhonsfran/unisoftware-api