Breaks with custom scalars
Meemaw opened this issue · comments
Matej Šnuderl commented
Version 3.1.0 breaks with custom scalars.
To reproduce:
class AddressScalar(Scalar):
base = String
@staticmethod
def coerce_address(value: Any):
...
serialize = coerce_address
parse_value = coerce_address
@staticmethod
def parse_literal(ast):
...
class Query(ObjectType):
test = String(x=AddressScalar())
schema = build_schema(query=Query)
Patrick Arminio commented
@Meemaw can you post the error? 😊
Arun Suresh Kumar commented
@Meemaw can you post the error? 😊
@patrick91 - This issue will be resolved in the #14 along with other few issues related to Compound keys as well.
Matej Šnuderl commented
It seems 3.1.1 still breaks with custom enums cc @arunsureshkumar @patrick91
File "/runner/_work/xx/.venv/lib/python3.11/site-packages/graphene_federation/utils.py", line 98, in get_attributed_fields
for field in list(type_.graphene_type._meta.fields):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EnumOptions' object has no attribute 'fields'
Patrick Arminio commented
@arunsureshkumar do you have time to check at this error too? :)
Arun Suresh Kumar commented
@arunsureshkumar do you have time to check at this error too? :)
Sure!
Arun Suresh Kumar commented
#15 - @patrick91 Please review.
Patrick Arminio commented
@Meemaw should be fixed in v3.1.2 :)
Patrick Arminio commented
sorry, it should be 3.1.3, I forgot to update the version in setup.py 🤦