Skip to content

Backend

Christina Ludwig edited this page Aug 26, 2022 · 4 revisions

The backend uses Python 3.9 and Django, Graphene and GraphQL.

GraphQL API

  1. Endpoint overview
  2. User management requests
  3. Working group management requests
  4. GraphQL Mutations
  5. GraphQL Queries
  6. Trouble Shooting
  7. Test data

For an up-to-date documentation of the API open the ./backend/docs/graphdoc/index.html locally. It might also be useful to look at the GraphQL API Tests to see how the requests work.

Django Settings

User account verification via email

During development the verification token can be either printed in the console of the backend container or be sent via email. This setting can be changed by editing EMAIL_BACKEND in ./backend/src/pledge4future/settings.py.

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend": Verification token printed in console EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend': Verification through sending email

Generate API documentation

Generate a GraphDoc documentation of the current API while the API is running on docker. This requires installing GraphDoc.

cd ./backend/
graphdoc -e http://localhost:8000/graphql/ -o ./docs/graphdoc --force