Is there a form of GraphQL query of a stream where a parameter data match can be set as a search term?
For a given #applicationId, for instance, querying against that amongst all objects in a stream would allow the changes over time for that singular object. (Subsequent commits only generating a new object in the stream if the serialized object has changed. And assuming no edge cases of #applicationId collisions)
I’m asking for a use case where a Base object includes other objects by reference and have need to keep that reference up-to-date to the most recent commit of that object.
To abstract that out for a moment,
- the main Branch consists of commits to models in a typical manner
- a second Branch is populated to re-categorise or pivot those models in a different way, akin to the filter categories, say.
- commits to the second Branch are grouped at the top-level by a parameter with children reference by Id
Time for some pseudoBase…
Main Branch
Base {
@Doors [
{
id: …1, applicationId: A
colour: Red
}
{
id: …2, applicationId: B
colour: Blue
}
]
@Walls [
{
id: …3, applicationId: C
colour: Green
}
{
id: …4, applicationId: D
colour: Blue
}
]
}
Categorised Branch
Base
@RedObjects [
{ referenceId: …1, speckle_type: reference }
]
@BlueObjects [
{ referenceId: …2, speckle_type: reference }
{ referenceId: …4, speckle_type: reference }
]
@GreenObjects [
{ referenceId: …3, speckle_typer: reference }
A second main branch commit amends Wall with applicationId C and consequently has a new Id
{
id: …7,
applicationId: C,
color: Green,
+ newFinishesParameter: ExpensivePaint
}
I’m wondering how to keep the Categorised Branch up to date with the new generated Id??? I’m assuming this wouldn’t be automatically handled by the server (I haven’t checked)
At the minute I’m re-parsing the Branches (I have several) and committing to each with every change.
Is there a better strategy available?