edgedb-python
edgedb-python copied to clipboard
Schema vs. reflected Python divergence
- We want to introspect a record the schema version into the generated
models/__init__.pyas__gel_schema_version__attribute. This way it's possible to build tooling that detects they diverge -- @elprans this is on you. - Some users might build ad-hoc validation to simply compare
.gelfiles update timestamps vs. generated.pyfiles - We want to make best effort at supporting outdated reflected schema at runtime
- We splat properties by default -- when a new property is added it'll start being returned. We can just skip unpacking/setting properties that aren't part of the reflected type.
- For cardinality/type changes -- we error out at runtime.
- For properties and links that are part of the expected
return_typebut aren't part of the type descriptor we do nothing