Skip to content

2.12.0

Compare
Choose a tag to compare
@kbarbounakis kbarbounakis released this 08 Dec 06:52
· 12 commits to main since this release
06f688d

What's Changed

@themost/[email protected] implements a cross environment data service for using @themost/client across different environments like node.js or browser.

import { BasicDataContext } from '@themost/client/common';

const context = new BasicDataContext("http://localhost:8080/api/", {
            useResponseConversion: true
        });
const items = await context
  .model("Products")
  .asQueryable()
  .select(({ id, name, category, model, price }) => ({
    id,
    name,
    category,
    model,
    price,
  }))
  .where((x: { price: number, category: string }) => {
    return x.price > 500 && x.category === "Laptops";
  })
  .orderByDescending((x: { price: number, category: string }) => x.price)
  .take(10).getItems();

Full Changelog: 2.11.0...2.12.0