in src/Epam.GraphQL/Configuration/Implementations/Relations/Relation.cs [268:289]
private void UpdateFakeProperties(TEntity entity, TChildEntity childEntity, TProperty fakePropertyValue)
{
if (HasFakePropertyValue(childEntity) && fakePropertyValue != null && fakePropertyValue.Equals(ChildPropertyGetter(childEntity)))
{
if (_childNavigationProperty == null && _navigationProperty == null)
{
throw new NotSupportedException($"Cannot update relation between {typeof(TEntity)} and {typeof(TChildEntity)}: navigation property was not supplied.");
}
if (((!_childNavigationProperty?.GetPropertyInfo()?.CanWrite) ?? false) && ((!_navigationProperty?.GetPropertyInfo()?.CanWrite) ?? false))
{
throw new NotSupportedException($"Cannot update relation between {typeof(TEntity)} and {typeof(TChildEntity)}: navigation property doesn't have setter.");
}
ChildPropertySetter(childEntity, default!);
ChildNavigationPropertySetter?.Invoke(childEntity, entity);
if (ChildNavigationPropertyGetter == null)
{
NavigationPropertySetter?.Invoke(entity, childEntity);
}
}
}