Releases: robsontenorio/vue-api-query
Releases · robsontenorio/vue-api-query
Stable release and for() method
- Tag 1.0.0 stable
for()
method for creating new related objects
Creating new related objects is easy. Just use the for() method, passing the related object.
let post = new Post({title: 'Woo!'})
// POST /posts
await post.save()
let comment = new Comment({text: 'New one for this post'}).for(post)
// POST /posts/1/comments
await comment.save()
Custom params
If you need to pass any extra param not provided by vue-api-query
pattern, just use the params()
method while querying:
// GET /users?doSomething=yes&process=no
let users = await User
.params({
doSomething: 'yes',
process: 'no'
})
.get()
Of course you can chain it with other methods, including on relationships.
// GET /posts/1/comments?include=user&blah=123
let comments = await post
.comments()
.include('user')
.params({blah: 123})
.get()
Add `primaryKey()` method.
In case your model does not work with default primary key ('id').
0.5.0
Support PUT, POST, DELETE for nested relationships
0.4.1
Fix internal variable name
0.4.0
-
Add
select()
for sparse fields -
Remove
find()
restriction for integers
0.3.0
- add
delete()
method
0.2.0
- add "fetch style request" with $get()
- add pagination with page() and limit()