malloy-html-data-app-runtime
Installation
SKILL.md
HTML Data App Runtime
Publisher.query(modelPath, malloy)returns an array of plain row objects. Build the Malloy string, let the model do the work, and render the rows with whatever front-end code you like.
The runtime loads from the root-relative <script src="/sdk/publisher.js"> and adds one global, window.Publisher.
The query contract
| Call | Returns | Use for |
|---|---|---|
Publisher.query(modelPath, malloy, opts?) |
Promise<Array> of rows |
driving your own charts and tables |
Publisher.queryFull(modelPath, malloy, opts?) |
Promise<MalloyResult> |
handing to <malloy-render> |
modelPathis the model FILE path within the package, with/separators ("subscriptions.malloy","models/events.malloy"). It is not the source name.malloyis any query string, written in standard Malloy. This skill covers only the JavaScript glue, not Malloy syntax.opts(all optional):sourceName,queryName,givens(a{ name: value }map bound to the model's Malloygiven:runtime parameters for this query; safe parameterization, values are bound by the runtime, not string-interpolated),filterParams(values for the model's legacy#(filter)source filters),bypassFilters, andenvironment/package(only if the page is served from outside/environments/<env>/packages/<pkg>/).givensandfilterParamscompose (both apply).