Problem
GraphLoader writes that participate in study-scoped MERGE keys (Entity, Property, Alias, ValueSet, Term-ValueSet, Term-Hierarchy, JoinPath, JoinPath-Uses, JoinPath-EntityLinks) require source_schema to isolate per-study graphs. Today most APIs accept source_schema=None and let Neo4j surface a downstream null-property error, which is hard to diagnose. Two of the join-path methods already raise; the rest are inconsistent.
Proposed solution
Add a _require_source_schema helper used by every loader method (and corresponding loader_utils batch function) that participates in a study-scoped MERGE, raising ValueError with a message that names the method and explains why source_schema is mandatory. Empty batches stay a no-op.
Alternatives considered
- Default
source_schema to a sentinel — silently masks the bug.
- Type-system enforcement (drop the
| None) — large blast radius across callsites and would still need runtime validation for the dynamic call paths.
Problem
GraphLoader writes that participate in study-scoped MERGE keys (
Entity,Property,Alias,ValueSet,Term-ValueSet,Term-Hierarchy,JoinPath,JoinPath-Uses,JoinPath-EntityLinks) requiresource_schemato isolate per-study graphs. Today most APIs acceptsource_schema=Noneand let Neo4j surface a downstream null-property error, which is hard to diagnose. Two of the join-path methods already raise; the rest are inconsistent.Proposed solution
Add a
_require_source_schemahelper used by every loader method (and correspondingloader_utilsbatch function) that participates in a study-scoped MERGE, raisingValueErrorwith a message that names the method and explains whysource_schemais mandatory. Empty batches stay a no-op.Alternatives considered
source_schemato a sentinel — silently masks the bug.| None) — large blast radius across callsites and would still need runtime validation for the dynamic call paths.