{"id":15150398,"url":"https://github.com/matrunchyk/vue-graphql","last_synced_at":"2025-09-29T19:30:33.340Z","repository":{"id":65477690,"uuid":"152568699","full_name":"matrunchyk/vue-graphql","owner":"matrunchyk","description":"Warning! Library migrated to vue-oop and is a part of it!","archived":true,"fork":false,"pushed_at":"2019-10-02T08:03:36.000Z","size":2343,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-22T03:43:01.981Z","etag":null,"topics":["collections","commonjs","eloquent","eloquent-models","es6","graphql","graphql-client","models","oop","orm","umd","universal","vue","webpack4"],"latest_commit_sha":null,"homepage":"https://github.com/matrunchyk/vue-oop","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/matrunchyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-11T09:49:17.000Z","updated_at":"2023-01-28T17:02:56.000Z","dependencies_parsed_at":"2023-01-25T06:45:20.780Z","dependency_job_id":null,"html_url":"https://github.com/matrunchyk/vue-graphql","commit_stats":null,"previous_names":["digitalideastudio/vue-graphql-models"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/matrunchyk/vue-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrunchyk%2Fvue-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrunchyk%2Fvue-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrunchyk%2Fvue-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrunchyk%2Fvue-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrunchyk","download_url":"https://codeload.github.com/matrunchyk/vue-graphql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrunchyk%2Fvue-graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277573534,"owners_count":25841458,"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-09-29T02:00:09.175Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["collections","commonjs","eloquent","eloquent-models","es6","graphql","graphql-client","models","oop","orm","umd","universal","vue","webpack4"],"created_at":"2024-09-26T14:03:44.299Z","updated_at":"2025-09-29T19:30:32.969Z","avatar_url":"https://github.com/matrunchyk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED\nMigrated to [vue-opp](https://github.com/matrunchyk/vue-oop) as a part of it! :tada:\n\n# Vue GraphQL Models\n\nUniversal library which helps to build OOP-driven GraphQL based models for Vue components.\nInfluenced by Laravel Eloquent Models \u0026 Collections.\n\n\n[![npm](https://img.shields.io/npm/v/vue-graphql-models.svg)](https://www.npmjs.com/package/vue-graphql-models) [![GitHub stars](https://img.shields.io/github/stars/digitalideastudio/vue-graphql-models.svg)](https://github.com/digitalideastudio/vue-graphql-models/stargazers)\n![Travis](https://api.travis-ci.org/digitalideastudio/vue-graphql-models.svg?branch=master) [![codecov](https://codecov.io/gh/digitalideastudio/vue-graphql-models/branch/master/graph/badge.svg)](https://codecov.io/gh/digitalideastudio/vue-graphql-models) [![GitHub license](https://img.shields.io/github/license/digitalideastudio/vue-graphql-models.svg)](https://github.com/digitalideastudio/vue-graphql-models/blob/master/LICENSE) \n\n_Note. If you looking for v1 of this library, switch to a [relevant branch](https://github.com/digitalideastudio/vue-graphql-models/tree/v1)._ \n\n\n## Features\n\n* `BaseModel` is a class which acts as a base entity for your models extending this class.\n* Full encapsulation of GraphQL queries \u0026 mutations. No need to call them manually, all you need is to call you Model's methods.\n* All arrays retrieved from GraphQL will be hydrated with respectful collections of models.\n* Supports lazy-loading of GraphQL documents.\n* Supports events \u0026 hooks for customization.\n\n###### Internally:  \n* Webpack 4 based.\n* ES6 as a source.\n* Exports in a [umd](https://github.com/umdjs/umd) format so library works everywhere.\n* ES6 test setup with [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/).\n* Linting with [ESLint](http://eslint.org/).\n\n## Installation\n\n`npm i vue-graphql-models -S`\n\nor\n\n`yarn add vue-graphql-models`\n\n## Configuration\n\n```\nimport VueGraphqlModels from 'vue-graphql-models';\n\nVue.use(VueGraphqlModels);\n```\n\n## Documentation\n\n### Basic Usage\n#### 1. Define your model:\n\n```\nimport { BaseModel } from 'vue-graphql-models';\n\nexport default class Fruit extends BaseModel {\n // Your additional logic, if needed\n //   ...or just empty class\n}\n```\n\n#### 2. Use it in your component:\n\n```\n\u003ctemplate\u003e\n   \u003cul\u003e\n     \u003cli v-if=\"model.loading\"\u003eLoading...\u003c/li\u003e\n     \u003cli v-else-if=\"model.error\"\u003eLoading Failed!\u003c/li\u003e\n     \u003cli v-else v-for=\"(item, index) in model.results.all()\" :key=\"index\"\u003e\n       \u003cp\u003eName: {{ item.name }}\u003c/p\u003e\n       \u003cp\u003eColor: {{ item.color }}\u003c/p\u003e\n     \u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport Fruit from '@/models/Fruit';\n\nexport default {\n  data: () =\u003e ({\n    model: new Fruit(),\n  }),\n\n  created() {\n    this.model.get();\n  },\n}\n\u003c/script\u003e\n```\n\n####[Full Documentation](https://digitalideastudio.github.io/vue-graphql-models/#/)\n\n## Contribution\n\nFeel free to submit your pull-requests, ideas, proposals and bug reports!\n \n### TODOs:\n- Add dynamic query/mutation building based on model attributes w/o need to create `.graphql` files at all\n- Make collections optional to make library more lightweight \n- Rewrite to TypeScript\n- Add subscriptions \u0026 events example\n- Write more tests \u0026 coverage support\n- Add model versioning support\n- Add a configurable operation confirmation when performing some risky operations. For example, automatically display a delete confirmation component when executing `.delete()` method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrunchyk%2Fvue-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrunchyk%2Fvue-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrunchyk%2Fvue-graphql/lists"}