Skip to content

Releases: vuex-orm/plugin-axios

v0.9.4

Choose a tag to compare

@cuebit cuebit released this 01 Feb 00:56

Bug Fixes

v0.9.3

Choose a tag to compare

@cuebit cuebit released this 07 May 03:16

Features

v0.9.2

Choose a tag to compare

@kiaking kiaking released this 25 Nov 15:01

Fixes

  • Fix where Vuex ORM typings not working due to the dependency graph management issue — solved by moving Vuex ORM dependency to peerDependencies.

v0.9.1

Choose a tag to compare

@kiaking kiaking released this 18 Nov 10:56

Improvements

  • #82 Warn users if the response data is non-array/object.

Fixes

  • #89 Fix where response.entities is not immediately available after the request call.

v0.9.0

Choose a tag to compare

@kiaking kiaking released this 05 Nov 13:23

New Features

Save response data after calling the API

When setting the save option to false, now you can persist response data afterward via save method on the response object.

// Don't save response data when calling API.
const result = await User.api().get('/api/users', {
  save: false
})

// Save data afterwards.
result.save()

Please refer to the documentation for more.

v0.8.0

Choose a tag to compare

@kiaking kiaking released this 31 Oct 11:04

New Features

Transform response data before persisting to the store.

Now you can transform response data by the new dataTransformer option.

This option will let you transform the response before persisting it to the store. Let's say your response from the server looks like below.

{
  ok: true,
  record: {
    id: 1,
    name: 'John Doe'
  }
}

You can use dataTransform property to specify how you want to transform the data. The whole Axios response will be passed as callback argument.

User.api().get('/api/users', {
  dataTransformer: (response) => {
    return response.data.record
  }
})

With the above config, the data inside record key will be inserted to the store.

It is very useful when you need to transform a given response to be handle by Vuex ORM. For instance, if you format your response with the JSON:API specs, you can transform your response with this callback.

Please check out the doc for more details.

Thanks so much to @guillaumebriday for this wonderful PR! 🎉

v0.7.0

Choose a tag to compare

@kiaking kiaking released this 21 Oct 01:09
341d395

Fresh Start

Vuex ORM Axios has been rewritten from scratch, ground up. All features from setting up the plugin and how use has become very different.

I hate to bring this big breaking change, but I believe it is going to make things much simpler, and also easier to maintain.

Please read through fresh new documentation on how to use the plugin.

If you find anything, please feel free to open an issue!

There's a lot of space where the plugin can be improved. We'll keep making better, so if you have any feedback, please let us know!

v0.5.1

Choose a tag to compare

@kiaking kiaking released this 08 Jul 13:33

Fixes

  • #34 Improper use of asyncronous method.
  • #45 Axios request interceptor + Fix: setAuthentication error on string.

0.5.0

Choose a tag to compare

@KaniRobinson KaniRobinson released this 15 Mar 22:25
Updated Package Number

0.4.0

Choose a tag to compare

@KaniRobinson KaniRobinson released this 15 Mar 22:01
Updated Version Number