Skip to content

AssertionError: Found different types with the same name in the schema: ... #843

Closed
@arielnmz

Description

@arielnmz

I know this has been submitted a million times, and I know there are several solutions BUT, despite all things it seems there still isn't a way to actually know where the duplicates come from, e.g. The error message would read:

AssertionError: Found different types with the same name in the schema: status, status.

But that doesn't give much information as to where do they come from. This is specially frustrating when plugging in projects. A suggestion would be to print the canonical name of the class the type is based on? something like 'my_module.types.ProblematicType'.

Anyway, this issue arises specifically because I defined a Type based on an Enum on my types module and I'm using that everywhere, but still graphql complains about different types having the same name. I double checked and I don't even use that name anywhere in my project, so it must be a conflicting dependency, but which one? where is that type being defined? The only way to know would be unplugging all dependencies and start plugging them one by one to find the offenders but this would be so inefficient and frankly, very stupid.

(in case you wonder I also searched in my site-packages and found nothing, so it must be auto generated somewhere...)

I'm using these packages:
django==2.2.9
graphene-django==2.7.1
graphene==2.1.8

And my types worked just fine with these versions:
django==2.1.5
graphene-django==2.2.0
graphene==2.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions