A JSON:API adapter for Vuex ORM that transforms JSON:API documents into Vuex ORM records, attributes, and relations. Version 1.0.0 (stable). It extends the Vuex ORM Axios plugin with RESTful actions (index, show, create, update, destroy) and handles JSON:API's primary data and included resources via upsert (insertOrUpdate). Key differentiators: automatic relationship resolution, configurable resource-to-entity case conversion, rawRequest API for accessing meta/links, and pass-through axios options. Requires @vuex-orm/core >=0.36.0 and a Vuex ORM Axios plugin. Release cadence is not specified but appears stable.
npm install vuex-orm-json-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install the plugin, define a User model, and call RESTful action index() to fetch users from the server.
Ensure you call VuexORM.use(VuexOrmJsonApi, { axios, mixins: [RestfulActionsMixin] }) before using jsonApi().Set jsonApiConfig.entityToResourceRouteCase or resourceToEntityCase on your model or during registration.
Do not expect a record from destroy(); it returns null after successful deletion.
Use 'import VuexOrmJsonApi from 'vuex-orm-json-api'' (default import) and pass as first argument to VuexORM.use().
Add mixins: [RestfulActionsMixin] to the options object passed to VuexORM.use().
Install axios: npm install axios