Skip to content

Conversation

@dnwpark
Copy link
Contributor

@dnwpark dnwpark commented Sep 4, 2025

Given a schema:

type Target;
type SourceWithProp {
    target: Target {
        lprop: int64;
    };
};

The following code will now sync correctly and pass assertions:

target = default.Target()
self.client.save(target)

source = default.SourceWithProp(target=target)
self.client.sync(source)

assert hasattr(source.target, '__linkprops__')
assert hasattr(source.target.__linkprops__, 'lprop')
assert source.target.__linkprops__.lprop is None

Previously, users would have to wrap the target using default.SourceWithProp.target.link() or a ValueError would be raised.

Similar behaviour has also been added to multi links.

@dnwpark dnwpark force-pushed the link-w-prop-wrap branch 4 times, most recently from 9670101 to 906a0ce Compare September 4, 2025 22:30
@dnwpark dnwpark merged commit f34116c into master Sep 5, 2025
43 checks passed
@dnwpark dnwpark deleted the link-w-prop-wrap branch September 5, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants