tfoxy / graphene-django-optimizer

Optimize database access inside graphene queries
MIT License
428 stars 84 forks source link

Swap to default resolver - Fixes #25 #26

Closed cramshaw closed 5 years ago

cramshaw commented 5 years ago

Graphene 2.1.5 changed the default resolver to attr_resolver for dict_or_attr_resolver.

See: https://github.com/graphql-python/graphene/blob/89a352e93ab17161ae20e5994814ec8bcc8e3988/graphene/types/resolver.py

This PR switches to import default_resolver which should ensure backwards and forwards compatibility.

@tfoxy We are using this library for prod code so it would be great to get this fixed and merged ASAP, currently the solution is to pin graphene to 2.1.3.

Let me know if I can do anything else to help.

Thanks!

codecov-io commented 5 years ago

Codecov Report

Merging #26 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   97.03%   97.03%           
=======================================
  Files           6        6           
  Lines         304      304           
=======================================
  Hits          295      295           
  Misses          9        9
Impacted Files Coverage Δ
graphene_django_optimizer/query.py 96.35% <100%> (ø) :arrow_up:

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 f9ecbf8...4284937. Read the comment docs.

bellini666 commented 5 years ago

I have made this change locally and it did indeed solve the problem

tfoxy commented 5 years ago

Hi! This is now fixed in v0.4.1!

Sorry for the delay. I'm going to transfer the ownership to the guys at @mirumee so hopefully it won't take this much time to merge these PRs in the future. For more info check #23 .