Does anyone know of any examples of creating a commit to modify objects from a web client.
For example if I want to add/edit a Speckle object in a web client, do I need to be using the GraphQL API directly. Is there a JS API similar to Python/C#?
Does anyone know of any examples of creating a commit to modify objects from a web client.
For example if I want to add/edit a Speckle object in a web client, do I need to be using the GraphQL API directly. Is there a JS API similar to Python/C#?
Hi @kgoulding! Unfortunately not. There is a way to create objects directly from the gql api (via the objectCreate
mutation), nevertheless thereâs a bit of legwork required and you need to exercise caution, especially if you modify an object inside a larger tree (inside another object), as all the correct closures need to be âhandcraftedâ and updated. This is easy inside a collection wrapper, but more difficult in a more structured object.
Whatâs your direct use case? If something easy, we can try and write a quick POC.
Youâll have to watch Davidâs presentation tomorrow for the full use case
Basically we are pulling polylines into a Google Map and then want to be able to trace elements on an aerial to pull back into a Speckle Stream (destination CAD / Rhino).
Another use case would be adding metadata to the geometry (e.g. classifications for landuse/density) that weâd want to persist in the stream.
Will definitely tune in for @haitheredavid 's show
I gotcha - use cases are clear. Creating from scratch shouldnât be a problem, but a mini SDK wouldnât hurt here. @izzylys has some incipient stuff in JS that was born for the SketchUp connectorâs needs (mini spoiler here). Letâs regroup after the conf and work things out!
You could have a look at how we create Globals as well: