Inter-Actief / amelie

De website van Inter-/Actief/. Vernoemd naar de film Amélie.
https://www.inter-actief.utwente.nl/
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

WIP: GraphQL API (public parts) #888

Open Kurocon opened 2 months ago

Kurocon commented 2 months ago

Please add the following information to your pull request:

Please describe what your PR is fixing Adds a GraphQL API for public resources.

Concretely, which issues does your PR solve? (Please reference them by typing Fixes/References Inter-Actief/amelie#<issue_id>) Fixes #741

Does your PR change how we process personal data, impact our privacy document, or modify (one of) our data export(s)? no

Does your PR include any django migrations? no

Does your PR include the proper translations (did you add translations for new/modified strings)? yes, I have included the translations

Does your PR include CSS changes (and did you run the compile_css.sh script in the scripts directory to regenerate the compiled.css file)? no, my PR does not include CSS changes

Does your PR need external actions by for example the System Administrators? (Think about new pip packages, new (local) settings, a new regular task or cronjob, new management commands, etc.)? no

Did you properly test your PR before submitting it? yes

Kurocon commented 2 months ago

Some (previously) private information is currently made public that we (probably) don't want:

ActivityType: (something seems to go wrong with the fields specification here as well)

CommitteeType:

AttachmentType:

WebsiteBannerType / TelevisionBannerType / VivatBannerType:

Rest looks good as far as I can tell!

Kurocon commented 2 months ago

We probably should also add unit tests for each attribute that is only shown when authenticated, to make sure it doesn't end up being publicly available at a later point. Graphene has some facilities for this: https://docs.graphene-python.org/projects/django/en/latest/testing/