Skip to content

Conversation

bastiW
Copy link

@bastiW bastiW commented Dec 29, 2018

See also: https://stackoverflow.com/a/49834443/2440049

If you inherit from a wrong type then the error you get an error which is confusing.
Currently you get ...type object ‘User’ has no attribute ‘name’
now you get ** [object_name] must inherit from DjangoObjectType. **

        if "has no attribute 'name'" in str(e):
            object_name = str(e).split("'")[1]

Those two lines I don't like so much but I didn't know how to get something like an error id.

Actually the current confusing part of the error is raised by Django. Do you think it is a better Idea to create a pull request in the django repository?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 94.268% when pulling 9b53db4 on bastiW:master into f76f38e on graphql-python:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 94.268% when pulling 9b53db4 on bastiW:master into f76f38e on graphql-python:master.

@firaskafri firaskafri closed this Mar 19, 2019
@bastiW
Copy link
Author

bastiW commented Mar 19, 2019

Is it already solved in a better way?

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.

3 participants