Open Meemaw opened 1 year ago
Hey, sorry for the late reply on this. I cannot reproduce your error with the following MWE:
from graphene_federation import shareable
from graphene_federation.entity import key
from graphene_federation.main import build_schema
def test_multiple_keys_share():
@shareable
@key(fields="identifier")
class User(ObjectType):
identifier = ID()
email = String()
class Query(ObjectType):
user = Field(User)
schema = build_schema(query=Query, enable_federation_2=True)
print(str(schema))
If I instead use pass for the object type or don't extend the objecttype class, I get an exception regardless of the order of @key/@shared
. But that's expected behavior. Can you share any additional context or a minimal example so I can have a closer look? ☺️
This fails:
But this works: