edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

Schema vs. reflected Python divergence

Open 1st1 opened this issue 7 months ago • 0 comments

  1. We want to introspect a record the schema version into the generated models/__init__.py as __gel_schema_version__ attribute. This way it's possible to build tooling that detects they diverge -- @elprans this is on you.
  2. Some users might build ad-hoc validation to simply compare .gel files update timestamps vs. generated .py files
  3. 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.
  4. For cardinality/type changes -- we error out at runtime.
  5. For properties and links that are part of the expected return_type but aren't part of the type descriptor we do nothing

1st1 avatar Jun 02 '25 20:06 1st1