{"repo":"matrunchyk/vue-oop","free":true,"listed":false,"github":"https://github.com/matrunchyk/vue-oop","clone":"git clone https://github.com/matrunchyk/vue-oop.git","description":"Vue OOP: Universal library which helps to build OOP-driven models for GraphQL and RESTful API for Vue components. Influenced by Laravel Eloquent Models & Collections.","language":"TypeScript","stars":17,"topics":["vue","oop","oop-concepts","model","orm","repository","ioc","ioc-container","graphql","rest"],"license":"MIT","category":"databases-storage","readme_excerpt":"Vue OOP Universal library which helps to build OOP-driven models for GraphQL and RESTful API for Vue components. Influenced by Laravel Eloquent Models & Collections. Note. If you looking for v1 of this library, switch to a relevant branch. Features Model is a class which acts as a base entity for your models extending this class. Repository is a class which manages Model collections (retrieval one or many) Registry is a Registry storage Collection is a Proxy based on collect.js package. Full encapsulation of GraphQL queries & mutations. No need to call them manually, all you need is to call you Model's methods. All arrays retrieved from GraphQL will be hydrated with respectful collections of models. Supports lazy-loading of GraphQL documents. Supports events & hooks for customization. Internally: TypeScript 3.9. Collect.JS. Apollo (if GraphQL activated). Installation npm i vue-oop -S or yarn add vue-oop Configuration for GraphQL: Configuration for REST: Documentation Basic Usage Step 1. Define your model: Step 2. Define your repository: Step 3. Use it in your component: JavaScript TypeScript Advanced Usage Dynamic Repository Query Params Sometimes we need to be able to pass params NOT in .many() or .one() . It happens, for example, when .many() is called not by you (i.e. 3rd party library or just other component). To achieve this, you can use the following syntax: Now when the userId variable changed, the queryParams are also updated and ready to be called. Contribution Feel ","default_branch":null,"files":null,"tree":[],"storefront":"/r/matrunchyk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/matrunchyk/vue-oop/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}