Skip to content

Releases: vuex-orm/plugin-axios

v0.9.4

01 Feb 00:56
Compare
Choose a tag to compare

Bug Fixes

v0.9.3

07 May 03:16
Compare
Choose a tag to compare

Features

v0.9.2

25 Nov 15:01
Compare
Choose a tag to compare

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

18 Nov 10:56
Compare
Choose a tag to compare

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

05 Nov 13:23
Compare
Choose a tag to compare

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

31 Oct 11:04
Compare
Choose a tag to compare

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

21 Oct 01:09
341d395
Compare
Choose a tag to compare

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

08 Jul 13:33
Compare
Choose a tag to compare

Fixes

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

0.5.0

15 Mar 22:25
Compare
Choose a tag to compare
Updated Package Number

0.4.0

15 Mar 22:01
Compare
Choose a tag to compare
Updated Version Number