Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only not work with relay node #24

Open
syfun opened this issue Jun 2, 2019 · 1 comment
Open

Only not work with relay node #24

syfun opened this issue Jun 2, 2019 · 1 comment

Comments

@syfun
Copy link

syfun commented Jun 2, 2019

First, thanks for this library😁.

When used with relay node, I found only optimize not worked. And the reason maybe this:

def _is_resolver_for_id_field(self, resolver):
resolve_id = DjangoObjectType.resolve_id
# For python 2 unbound method:
if hasattr(resolve_id, 'im_func'):
resolve_id = resolve_id.im_func
return resolver == resolve_id

resolver is functools.partial and it's func is GlobalID.id_resolver, it's args[0] is DjangoObjectType.resolve_id.

Environment:
Python: 3.7.3
Django: 2.2.1

@abtuleshov
Copy link

the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants