Vue API Query is a package that helps you quickly to build requests for REST API, and keep your code clean and elegant.

vuejstutorials

Installation

yarn add vue-api-query

Basic usage

// GET /posts?filter[status]=ACTIVE&include=user,category&append=likes&orderBy=-created_at,category_id

let posts = await Post
  .where('status', 'ACTIVE')
  .include('user', 'category')
  .append('likes')
  .orderBy('-created_at', 'category_id')  
  .get()