Gathering detailed insights and metrics for vue-apollo-decorators
Gathering detailed insights and metrics for vue-apollo-decorators
Gathering detailed insights and metrics for vue-apollo-decorators
Gathering detailed insights and metrics for vue-apollo-decorators
Use decorators to create Vue Apollo smart queries
npm install vue-apollo-decorators
Typescript
Module System
TypeScript (88.13%)
JavaScript (11.87%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
3 Stars
69 Commits
1 Forks
1 Branches
1 Contributors
Updated on Jan 17, 2022
Latest Version
2.0.0
Package Id
vue-apollo-decorators@2.0.0
Unpacked Size
325.38 kB
Size
71.71 kB
File Count
80
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
4
33
Use decorators to create Vue Apollo smart queries
1yarn add vue-apollo-decorators 2npm i vue-apollo-decorators
1<script src="https://unpkg.com/vue-apollo-decorators@2.0.0"></script>
There is currently 1 decorator.
@SmartQuery(options: DocumentNode | VueApolloQueryDefinition)
decorator1import gql from "graphql-tag"; 2import { SmartQuery } from "vue-apollo-decorator"; 3import { Vue, Component } from "vue-property-decorator"; 4 5@Component 6export default class YourComponent extends Vue { 7 @SmartQuery<YourComponent, Todo.Query, Todo.Variables>({ 8 query: gql` 9 query Todo($id: String!) { 10 todo(id: $id) { 11 id 12 title 13 } 14 } 15 `, 16 variables() { 17 return { 18 id: this.id, 19 }; 20 }, 21 }) 22 todo: Todo; 23 24 id: number = 0; 25}
is equivalent to
1export default { 2 apollo: { 3 todo: { 4 query: gql` 5 query Todo($id: String!) { 6 todo(id: $id) { 7 id 8 title 9 } 10 } 11 `, 12 variables() { 13 return { 14 id: this.id, 15 }; 16 }, 17 }, 18 }, 19};
@SubscribeToMore(options: SubscribeToMoreOptions)
decorator1import gql from "graphql-tag"; 2import { SmartQuery, SubscribeToMore } from "vue-apollo-decorator"; 3import { Vue, Component } from "vue-property-decorator"; 4 5@Component 6export default class YourComponent extends Vue { 7 @SmartQuery(gql`{ todos { id, title } }`) todo: Todo; 8 @SubscribeToMore({ 9 document: gql` 10 subscription TodoSubscription { 11 todo { 12 id, 13 title, 14 } 15 } 16 `, 17 updateQuery(prevData, { subscriptionData }) { 18 return [...prevData, ...subscriptionData]; 19 }, 20 }) 21 todos: Todo; 22}
is equivalent to
1export default { 2 apollo: { 3 todos: { 4 query: gql`{ todos { id, title } }`, 5 subscribeToMore: [ 6 { 7 document: gql` 8 subscription TodoSubscription { 9 todo { 10 id 11 title 12 } 13 } 14 `, 15 updateQuery(prevData, { subscriptionData }) { 16 return [...prevData, ...subscriptionData]; 17 }, 18 }, 19 ], 20 }, 21 }, 22};
ISC License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
40 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More