zazuko / rdf-cube-view-query

RDF Cube View Schema query library
2 stars 3 forks source link

feat: support listing cubes without fetching shapes #53

Closed bergos closed 3 years ago

bergos commented 3 years ago

This PR adds an option to fetch the list of cubes without the shapes. A typical use case would look like this:

// list all cubes without shapes
const cubes = await source.cubes({ noShape: true })

// select one of the cubes
const metaCube = cubes.find(c => Math.random() > 0.5)

// upgrade the cube to a full featured cube
const cube = await source.cube(metaCube.term)
jstcki commented 3 years ago

@bergos Cool! Just to clarify: on the no-shape cubes I can still access other metadata that is directly attached to the cube (like schema:name etc.), right?