Package detail

@vuex-orm/plugin-axios

vuex-orm9.5kMIT0.9.4

Vuex ORM plugin for adding smooth integration with axios.

vue, vuex, vuex-plugin, vuex-orm

readme

Vuex ORM

Vuex ORM Plugin: Axios

npm Travis CI codecov License

Vuex ORM Axios plugin adds smooth integration between API requests and Vuex ORM data persistence through the awesome axios.

If you use axios with Vuex ORM, you may find handling requests can become an arduous and repetitive process. This plugin bridges Vuex ORM and axios and brings a unified process to perform requests and persist response data with ease.

// Example usage: fetch users and persist to store.
User.api().get('/api/users')

Sponsors

Vuex ORM is sponsored by awesome folks. Big love to all of them from whole Vuex ORM community :two_hearts:

Super Love Sponsors

Peter Tóth Mario Kolli Cannikan Andy Koch Dylan Copeland

Big Love Sponsors

geraldbiggs Cue Kazuya Kawaguchi jShaf

A Love Sponsors

George Chaduneli bpuig John mean-cj

Documentation

You can check out the full documentation for Vuex ORM Plugin: Axios at https://vuex-orm.github.io/plugin-axios.

Questions & Discussions

Join us on our Slack Channel for any questions and discussions.

Although there is the Slack Channel, do not hesitate to open an issue for any question you might have. We're always more than happy to hear any feedback, and we don't care what kind of form they are.

Plugins

Vuex ORM can be extended via plugins to add additional features. Here is a list of available plugins.

Contribution

We are excited that you are interested in contributing to Vuex ORM Plugin: Axios! Anything from raising an issue, submitting an idea of a new feature, or making a pull request is welcome! Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.

Pull Request Guidelines

When submitting a new pull request, please make sure to follow these guidelines:

  • For feature requests: Checkout a topic branch from dev branch, and merge back against dev branch.
  • For bug fixes: Checkout a topic branch from master branch, and merge back against master branch.

These rules also apply to the documentation. If you're submitting documentation about a new feature that isn't released yet, you must checkout the dev branch, but for non-functional updates, such as fixing a typo, you may checkout and commit to the master branch.

Scripts

There are several scripts to help with development.

yarn build

Compile files and generate bundles in dist directory.

yarn lint

Lint files using Prettier.

yarn test

Run the test using Jest.

yarn test:watch

Run the test in watch mode.

yarn coverage

Generate test coverage in coverage directory.

yarn docs

Build and boot documentation server with VuePress.

License

Vuex ORM Plugin: Axios is open-sourced software licensed under the MIT license.

changelog

0.9.4 (2021-02-01)

Bug Fixes

  • axios dependency remediation (2c897a9)

0.9.3 (2020-05-07)

Features

  • add persistOptions to handle relation persistence (#121) (4345c98)
  • add configurable persistBy option (#119) (2110528)

0.9.2 (2019-11-25)

Bug Fixes

  • add Vuex ORM as a peer dependency (e61be34)

0.9.1 (2019-11-18)

Bug Fixes

  • fix where response.entities is not immediately available after the request call (#89)

Features

  • warn users if the response data is non-array/object (#82)

0.9.0 (2019-11-05)

Features

  • save response data after calling the API (ba48434)

0.8.0 (2019-10-31)

Features

  • transform response data before persisting to the store. (#80)

0.7.0 (2019-10-21)

BREAKING CHANGES

  • refactored entire plugin from the ground up. Please check out the docs for more details. (341d395)

0.5.1 (2019-07-08)

Bug Fixes

  • improper use of asynchronous method (#34)
  • axios request interceptor + fixed setAuthentication error on string (#45)

0.5.0 (2019-03-15)

Bug Fixes

  • reduce lodash imports (#16)
  • allow axios instance to be passed into plugin (#18)
  • expose axios instance to interceptors to allow for custom response handling with tokens (#7)

0.4.0 (2019-03-15)

Bug Fixes

  • fixed custom http method (b3ce9b4)

0.3.0 (2019-03-15)

Bug Fixes

  • uncaught exception on network error (7a28af7)

Features

  • allow get access token as function (a100695)

0.2.2 (2018-10-12)

Bug Fixes

  • fixed params which are not set (9d33522)

0.2.1 (2018-10-12)

Bug Fixes

  • fixed bug with automatic config params not being overwritten with a value (:id) (590b4b6)

0.2.0 (2018-10-12)

Features

  • added endpoint param extractor (709f56f)

0.1.2 (2018-10-11)

Bug Fixes

  • fixed issue with SSR on Nuxt (#5)

0.1.1 (2018-10-08)

Bug Fixes

  • fixed issue where vue-cli projects could not use async/await functions (beb2894)

0.1.0 (2018-10-04)

Initial release 🎉