graphql-python / graphql-python/graphene-federation

Bug: Compound Key Definition doesn't work with EnumField

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
42
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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:
```python
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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.