Skip to content

Commit d4cd084

Browse files
committed
feat(readme): Updated readme
1 parent 72d6b52 commit d4cd084

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Vue GraphQL Inject
2+
[![npm](https://img.shields.io/npm/v/vue-graphql-inject.svg)](https://www.npmjs.com/package/vue-graphql-inject)
3+
[![npm type definitions](https://img.shields.io/npm/types/vue-graphql-inject.svg)](https://www.npmjs.com/package/vue-graphql-inject)
24

35
A simple way to use your GraphQL operations in a type-safe way with Vue!
4-
It uses [graphql-code-generator](https://github.com/dotansimha/graphql-code-generator) to generate the types everything.
6+
It uses [graphql-code-generator](https://github.com/dotansimha/graphql-code-generator) to generate the types.
57

68
### Quick start
79
As this package is dependent on [graphql-code-generator](https://github.com/dotansimha/graphql-code-generator) you may first install it and create a config for it.
@@ -29,7 +31,16 @@ import { GraphQLInjectDefinition } from './generated/graphql-inject.ts'
2931
Vue.use(VueGraphQLInject, { definition: GraphQLInjectDefinition })
3032
```
3133

32-
# Setup
34+
Congratulations, you're now read to get started! Now you can use the following code in your Vue components:
35+
```javascript
36+
// For mutations:
37+
this.$gql().mutations.UpdateUser
38+
39+
// For quries:
40+
this.$gql().queries.GetUser
41+
```
42+
43+
# Install
3344
With NPM:
3445
```
3546
$ npm install vue-graphl-inject

0 commit comments

Comments
 (0)