An isomorphic JavaScript/TypeScript ORM client for Graphiti APIs, modeled after ActiveRecord. This fork (v0.10.22-mt-2) is maintained by MachineTools developers. It supports decorator-based model definitions, query building with scoping, pagination, sorting, and includes, and works in both browser and Node.js environments. Unlike generic HTTP clients, it provides a structured, type-safe way to interact with JSON:API-compliant backends. The library ships TypeScript definitions but also works with plain ES5. Release cadence is irregular as it's a fork maintained for specific project needs.
npm install spraypaint-machinetoolsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Pet model with an attribute and fetches all records from the API.
Set "experimentalDecorators": true in tsconfig.json.
Use @Model() decorator on the class instead of a separate registration call.
Declare static baseUrl = '...' and static apiNamespace = '...' in the base class.
Use .include('pets') instead of .includes('pets').Import { SpraypaintBase } from 'spraypaint'.Enable 'experimentalDecorators' in tsconfig.json.
Add static baseUrl = 'http://example.com' to your ApplicationRecord class.
No dependency data recorded yet.