Skip to content

AssertionError: Found different types with the same name in the schema: EmployeeConnection, EmployeeConnection. #220

Closed
@huanganqing

Description

@huanganqing
class EmployeeConnection(relay.Connection):
    class Meta:
        node = Employee

class Query(graphene.ObjectType):
    node = relay.Node.Field()
    # Allow only single column sorting
    #employee = relay.Node.Field(Employee)
    department = relay.Node.Field(Department)
    #all_employees = SQLAlchemyConnectionField(Employee)
    all_employees = SQLAlchemyConnectionField(EmployeeConnection)

    # Allows sorting over multiple columns, by default over the primary key
    all_roles = SQLAlchemyConnectionField(Role)
    # Disable sorting over this field
    all_departments = SQLAlchemyConnectionField(Department, sort=None)

#schema = graphene.Schema(query=Query, types=[Department, Employee, Role])
schema = graphene.Schema(query=Query)

I got following error when i try to run app.py


line 99, in graphene_reducer
    ).format(_type.graphene_type, type)
AssertionError: Found different types with the same name in the schema: EmployeeConnection, EmployeeConnection.

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