sasakiassociates / speckle

JavaScript client for the Speckle API
15 stars 1 forks source link

Provide a way to retrieve select object IDs and metadata without loading full geometry data #4

Open gouldingken opened 1 year ago

gouldingken commented 1 year ago

It seems like an advantage of GraphQL is that you grab only what you need, whereas the moment you 'hit' an object with the objectloader - it grabs all the data for that node and everything beneath. This seems to include all geometry data within that commit e.g. when using stream.Object(commit.referencedObject).data).

Can we provide a way to list all objects and their metadata in a commit without also grabbing their full geometry info. It seems like there should be a way to get that with GraphQL?

Perhaps the API could allow only specified fields to be queried - e.g. @Name and @Data and we may want to consider stitching the separated lists that are fed into Speckle Grasshopper Nodes back into a more web-friendly object format.