Hello everyone, hope you are all doing well!

Despite there being a few tools to integrate GraphQL with Django, the 
community stance towards their union is "it could be much better". This is 
expected, since though these tools exist, they are not made with the best 
developer experience in mind. Their development is very slow if not 
completely unmaintained. Unfortunately this pitiable condition of Django 
and GraphQL turns many developers away from using Django for their GraphQL 
projects.
<https://github.com/IgnisDa/ignisda.me/blob/development/frontend/content/projects/gsoc/2021/django.md#but-why-should-we-focus-on-graphql-then>*Project
 
Idea*
I would like to work on a library that is tightly coupled to django's 
existing and foolproof concepts of Views and Models. Just like django rest 
framework has class based views like DetailView, ListView and the other 
concrete 
view classes 
<https://www.django-rest-framework.org/api-guide/generic-views/#concrete-view-classes>,
 
I would like to implement them in this package.

Next, I plan to tackle authentication using both token and then using JWT. 
I have already implemented a package to achieve token based authentication 
using this <https://github.com/IgnisDa/ariadne-token-auth> package and I 
plan to integrate it with this new project itself. JWT is slightly trickier 
for me and I would have to carefully plan how to go about implementing it.

Pagination is another complex topic which takes some time to develop 
schemas for. Though I have not figured out how to actually implement this 
yet, I will try to develop a basic plan to do it efficiently.

Exception handling is another core feature that needs to be taken special 
care of. As mentioned in this <https://stackoverflow.com/a/59733362> answer, 
GraphQL generally returns a status code of either *200 *OR *500 (*if 
something went really bad). Since it is not possible for clients to check 
if a request actually succeeded on the basis of the returned status code, 
it becomes imperative to return error messages that clearly explain what 
went wrong. I plan to make error handling a breeze by making some helper 
modules.

Though there are existing (and arguably better) packages to do, I have also 
planned on creating serializers 
<https://www.django-rest-framework.org/api-guide/serializers/>, if time 
permits me.

Finally, I have decided to build this package on top on ariadne 
<https://github.com/mirumee/ariadne> and not graphene-django 
<https://github.com/graphql-python/graphene-django>*.* This is because 
there are various design flaws in the latter which make it very unwieldy to 
use, especially while trying to return errors in your response. Though 
ariadne is newer compared to graphene, it is generally, in my experience, 
more stable, easier to use and also support file uploads.

Please let me know what you think about this and whether I should go 
forward with this idea for GSOC.

Regards
Diptesh Choudhuri

PS: *I have also* *started preparing a very much work in progress proposal 
here 
<https://github.com/IgnisDa/ignisda.me/blob/development/frontend/content/projects/gsoc/2021/django.md>,
 
if you are interested.*

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/37620d9a-7c28-471b-9fa8-d92d8ced6181n%40googlegroups.com.

Reply via email to