Skip to content

Conversation

eyalch
Copy link

@eyalch eyalch commented Feb 22, 2018

After more digging than I expected (and planned), I'm 99% sure that the problem comes from graphene_django. I checked (as much as I could) the source codes of: Django, Graphene, and Django Filter (and this one of course).

I found a comment in Django's source that refers to an attribute named remote_field, instead of rel.

It seamed to fix the problem for me without any other bugs (yet).

After more digging than I expected (and planned), I'm 99% sure that the problem comes from `graphene_django`.

I found a [comment](https://github.com/django/django/blob/16436f3751e9eec67a7b80b25c8e7d29a34be67e/django/db/models/fields/reverse_related.py#L4-L6) in Django's source that refers to an attribute named `remote_field`, instead of `rel`.

It seamed to fix the problem for me without any other bugs (yet).
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 94.376% when pulling e51f607 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 94.376% when pulling e51f607 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 94.376% when pulling e51f607 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 94.376% when pulling e51f607 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 94.376% when pulling e51f607 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

@coveralls
Copy link

coveralls commented Feb 22, 2018

Coverage Status

Coverage remained the same at 94.581% when pulling e12c329 on eyal0803:patch-1 into dbd3957 on graphql-python:master.

@jkimbo
Copy link
Member

jkimbo commented Feb 23, 2018

@eyal0803 looks like this is failing with Django 1.8. Could you add a workaround?

@jkimbo
Copy link
Member

jkimbo commented Feb 23, 2018

Good find though!

Since I didn't know why the `rel` attribute wasn't there in the first place, maybe it's better to use the `remote_field` only if it's there and leave `rel` as a default (i.e else).
@jkimbo
Copy link
Member

jkimbo commented Feb 23, 2018

Thanks @eyal0803 !

@syrusakbary this looks good to merge now

@syrusakbary syrusakbary merged commit 34ddc6c into graphql-python:master Mar 1, 2018
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

Successfully merging this pull request may close these issues.

4 participants