django-dynamic-preferences icon indicating copy to clipboard operation
django-dynamic-preferences copied to clipboard

Add support for Graphene-Django

Open Natureshadow opened this issue 2 years ago • 3 comments

In addition to the REST API support, support for GraphQL would be good.

  1. Define queries and mutations for the GraphQL schema in api/schema.py
  2. Re-use the REST API serializers
  3. Make sure the GraphQL queris and mutations use the same permission checks as the REST API viewsets do
  4. Add documentation on how to inject the queries and mutations into the project schema

Natureshadow avatar Aug 02 '22 21:08 Natureshadow

I've give it some thoughts and I think it should be done outside of the project: I have no experience with GraphQL and won't be able to test and maintain such a feature properly. As far as I can tell, one could do all the steps you describe in their own project, or in a dedicated, reusable package.

However, even if I'd rather not add direct support for graphql and dependencies in django-dynamic-preferences, we could definitely add a section in the documentation to explain how to do so, e.g with code snippets. I have no issue with reviewing and merging such a contribution, since it will be low maintainance :)

agateblue avatar Aug 10 '22 13:08 agateblue

Being a co-maintainer on this package, I was intending to take on the maintenance of this feature. I cannot do much on the whole project currently, but adopting on separate part is feasible.

Natureshadow avatar Aug 13 '22 14:08 Natureshadow

If you feel like implementing and maintaining it, it's a different story then. I can't provide much guidance on the GraphQL aspects, but I'm up to review or help with other aspects of your work :)

agateblue avatar Aug 13 '22 15:08 agateblue