{"id":15391893,"url":"https://github.com/scrum/vue-axillo","last_synced_at":"2025-07-23T04:03:30.289Z","repository":{"id":41240332,"uuid":"298584027","full_name":"Scrum/vue-axillo","owner":"Scrum","description":"Composable Axios for REST API with query notation GraphQL","archived":false,"fork":false,"pushed_at":"2021-11-11T07:05:02.000Z","size":154,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T06:13:57.195Z","etag":null,"topics":["axios","composable","graphql","rest-api","vuejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scrum.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/scrumpay"]}},"created_at":"2020-09-25T13:41:40.000Z","updated_at":"2023-10-16T16:50:27.000Z","dependencies_parsed_at":"2022-09-10T20:52:16.325Z","dependency_job_id":null,"html_url":"https://github.com/Scrum/vue-axillo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Scrum/vue-axillo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fvue-axillo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fvue-axillo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fvue-axillo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fvue-axillo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scrum","download_url":"https://codeload.github.com/Scrum/vue-axillo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fvue-axillo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266614309,"owners_count":23956342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","composable","graphql","rest-api","vuejs"],"created_at":"2024-10-01T15:13:25.693Z","updated_at":"2025-07-23T04:03:30.213Z","avatar_url":"https://github.com/Scrum.png","language":"JavaScript","readme":"# vue-axillo \n\u003e Composable [Axios](https://github.com/axios/axios) for [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API with query notation [GraphQL](https://graphql.org/)\n\n[![Actions Status](https://github.com/Scrum/vue-axillo/workflows/Actions%20Status/badge.svg?style=flat-square)](https://github.com/Scrum/vue-axillo/actions?query=workflow%3A%22CI+tests%22)[![node](https://img.shields.io/node/v/vue-axillo.svg?style=flat-square)]()[![npm version](https://img.shields.io/npm/v/vue-axillo.svg?style=flat-square)](https://www.npmjs.com/package/vue-axillo)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/xojs/xo)[![Coveralls status](https://img.shields.io/coveralls/Scrum/vue-axillo.svg?style=flat-square)](https://coveralls.io/r/Scrum/vue-axillo)\n\n[![npm downloads](https://img.shields.io/npm/dm/vue-axillo.svg?style=flat-square)](https://www.npmjs.com/package/vue-axillo)[![npm](https://img.shields.io/npm/dt/vue-axillo.svg?style=flat-square)](https://www.npmjs.com/package/vue-axillo)\n\n## Why?\nAxillo is a set of tools effort to help you use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API in your apps. It's well known for its client and its server.\n\nAll queries use [rexios](https://github.com/Scrum/rexios) utils normalize url, data, params for axios when using [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API request\n\n## Install\n\n```bash\n$ npm install vue-axillo\n```\n\n\u003e **Note:** This project is compatible with node v10+\n\n## Usage\n\n### Query\n\n\u003e For `query` requests the `get` method is used by default\n\n```js\nimport axillo  from 'vue-axillo';\n\nexport default {\n  setup() {\n    const { \n      query,        // query method\n      loading,      // request status\n      result: users // reactive data\n    } = axillo({\n      baseURL: 'v2/api/user/'\n    });\n\n    async function submit() {\n      await query(/* params */); // =\u003e request on 'v2/api/user/'\n    }\n\n    return {\n      submit,\n      loading,\n      users,\n    }\n  }\n}\n```\n\n### Query with params\n```js\nimport axillo  from 'vue-axillo';\n\nexport default {\n  setup() {\n    const { \n      query,        // query method\n      loading,      // request status\n      result: users // reactive data\n    } = axillo({\n      baseURL: 'v2/api/user/'\n    });\n\n    async function submit() {\n      await query({\n        id: 123,\n        article: 1,\n      }); // =\u003e request on 'v2/api/user/123/?article=1'\n    }\n\n    return {\n      submit,\n      loading,\n      users,\n    }\n  }\n}\n```\n\n### Query with reactive params\n```js\nimport axillo  from 'vue-axillo';\nimport { ref, watch } from 'vue' // vue 3 or composition-api\n\nexport default {\n  setup() {\n    const name = ref(null);\n    const { \n      params: searchByName, // params for query\n      loading,              // request status\n      result: users         // reactive data\n    } = axillo({\n      baseURL: 'v2/api/user/'\n    });\n\n    watch(name, value =\u003e {\n      searchByName.value = value;\n    });\n\n    return {\n      loading,\n      users,\n    }\n  }\n}\n```\n\n### Mutate\n\n\u003e For `mutate` requests the `post` method is used by default\n\n```js\nimport axillo  from 'vue-axillo';\n\nexport default {\n  setup() {\n    const { \n      mutate,   // mutate method\n      loading,  // request status\n      onDone,   // suceess callback\n      onError,  // error callback\n    } = axillo({\n      baseURL: 'v2/api/user/'\n    });\n\n    function submit() {\n      mutate({\n        name: 'Scrum'\n      });\n    }\n\n    onDone(response) {\n      console.log(`User ${response.name} created.`);\n    }\n\n    return {\n      submit,\n      loading,\n    }\n  }\n}\n```\n\n## Options\n\n#### `baseURL`\n\nType: `String` **`required`**  \nDefault: `null`  \nDescription: *URL api used at `query` `mutation`*\n\n#### `method`\n\nType: `String`  \nDefault: `get|post`  \nDescription: *for `query` requests the `get` method is used by default, for `mutate` requests the `post` method is used by default*\n\n#### `apiClient`\n\nType: `Function`  \nDefault: [Axios](https://github.com/axios/axios)  \nDescription: *HTTP client*\n","funding_links":["https://paypal.me/scrumpay"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrum%2Fvue-axillo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrum%2Fvue-axillo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrum%2Fvue-axillo/lists"}