Closed hofmatthias closed 3 years ago
I'll take a look, likely it's better to just defval = arg.get('defaultValue')
but I'll see.
I think I didn't notice this one since most servers return that property even when it has no value
I had that issue with the schema I retrieved from the company I work at right now. I can fix it locally, but it's better to have it available on master.
released as https://pypi.org/project/sgqlc/13.0/
If a passed arg in write_arg in schema.py doesn't have a defaultValue this throws a KeyError:
Currently:
defval = arg['defaultValue'] if defval: ...
Proposal:
defval = arg['defaultValue'] if "defaultValue" in arg.keys() else None