eamigo86 / graphene-django-extras

Extras functionalities for Graphene-Django
MIT License
417 stars 107 forks source link

auth checking in mutations #159

Open keinagae opened 4 years ago

keinagae commented 4 years ago

Hi,

Feature to be included Auth for mutation and Queries

I was working on my personal project and had to use auth checking for mutations so i wrote a child class from existing DjangoSerializerMutation that does all permission checking and auth checking for create update and delete methods and was hoping that these changes could easily be included in current graphene-django-extras so let me know what you guys think and i am willing to include auth for other classes as well as i will write for my personal project any way

currently there is a sub class for auth but we can easily make DjangoSerializerMutation to have auth functionality

so let me know i am will to add this feature

codecov[bot] commented 4 years ago

Codecov Report

Merging #159 into master will decrease coverage by 0.31%. The diff coverage is 43.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
- Coverage   53.65%   53.34%   -0.32%     
==========================================
  Files          24       26       +2     
  Lines        1968     2034      +66     
==========================================
+ Hits         1056     1085      +29     
- Misses        912      949      +37     
Impacted Files Coverage Δ
graphene_django_extras/permissions.py 31.57% <31.57%> (ø)
graphene_django_extras/mutation.py 35.53% <46.34%> (+3.04%) :arrow_up:
graphene_django_extras/exceptions.py 57.14% <57.14%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update abb5a33...05fb2e3. Read the comment docs.

keinagae commented 4 years ago

I am new to all this so can you explain what these tests failing mean?

And i was looking we can also make DjangoSerializerMutation class to have auth functionality instead of other class with auth name so what do you recommend ?

keinagae commented 4 years ago

oh sorry i found that there are no tests available to test new code that i wrote so should i provide tests for new functionality as well