Skip to content

Releases: robsontenorio/vue-api-query

Stable release and for() method

16 Jul 16:10
Compare
Choose a tag to compare
  • 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

05 Jun 01:15
Compare
Choose a tag to compare

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.

16 May 18:21
Compare
Choose a tag to compare

In case your model does not work with default primary key ('id').

0.5.0

11 Apr 03:49
Compare
Choose a tag to compare

Support PUT, POST, DELETE for nested relationships

0.4.1

06 Apr 22:54
Compare
Choose a tag to compare

Fix internal variable name

0.4.0

05 Apr 12:43
Compare
Choose a tag to compare
  • Add select() for sparse fields

  • Remove find() restriction for integers

0.3.0

31 Mar 01:44
Compare
Choose a tag to compare
  • add delete() method

0.2.0

30 Mar 04:32
Compare
Choose a tag to compare
  • add "fetch style request" with $get()
  • add pagination with page() and limit()