Skip to content

Bug: Compound Key Definition doesn't work with EnumField #23

Open
@abhinand-c

Description

@abhinand-c

When using Enum Field as a key in containing a compound statement, validation fails and doesn't work (raises AssertionError: Invalid compound key definition for type). But the same works if there is no compound key, only enum key.

Following sample can be used to reproduce the issue:

class OrgTypeEnum(Enum):
    LOCAL = 0
    GLOBAL = 1

class Organization(ObjectType):
    registration_number = ID()
    organization_type = OrgTypeEnum()

@key("id organization { registration_number  organization_type } ")
class User(ObjectType):
    id = ID()
    organization = Field(Organization)

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