Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DUI33 289 investigate and create versioning poc #7

Draft
wants to merge 15 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Speckle.Core/Api/GraphQL/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public class CommitCreateInput
public string sourceApplication { get; set; } = ".net";
public int totalChildrenCount { get; set; }
public List<string> parents { get; set; }

public string SchemaVersion { get; set; }

[Obsolete("Please use the parents property. This property will be removed in later versions")]
public List<string> previousCommitIds { get; set; }
Expand Down Expand Up @@ -207,6 +209,10 @@ public class Commit
public int totalChildrenCount { get; set; }
public List<string> parents { get; set; }

// should be nullable but is currently disabled here
// null schema == this is old AF
public string SchemaVersion { get; set; }

public override string ToString()
{
return $"Commit ({message} | {id})";
Expand Down
8 changes: 8 additions & 0 deletions src/Speckle.Core/Api/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
using Speckle.Core.Kits;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Core.SchemaVersioning;
using Speckle.Core.Serialisation.TypeCache;
using Speckle.Core.Transports;
using Speckle.Newtonsoft.Json;

Expand All @@ -35,6 +37,9 @@ public static class Helpers
/// <returns></returns>
public static async Task<Base> Receive(
string stream,
ITypeCache typeCache,
ISchemaObjectUpgradeManager<Base, Base> objectUpgradeManager,
System.Version schemaVersion,
Account account = null,
Action<ConcurrentDictionary<string, int>> onProgressAction = null,
Action<int> onTotalChildrenCountKnown = null
Expand Down Expand Up @@ -107,6 +112,9 @@ public static class Helpers
var receiveRes = await Operations
.Receive(
objectId,
typeCache,
objectUpgradeManager,
schemaVersion,
transport,
onProgressAction: onProgressAction,
onTotalChildrenCountKnown: onTotalChildrenCountKnown
Expand Down
Loading
Loading