10000 chore: update readme · wheatjs/vite-plugin-vue-gql@aa6b1ad · GitHub
[go: up one dir, main page]

Skip to content

Commit aa6b1ad

Browse files
committed
chore: update readme
1 parent b033d4c commit aa6b1ad

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99

1010
## Why?
11-
In the process of writing Vue applications that connect to GraphQL servers, I've started to notice that my graphql quieres are overcrowding my Vue SFC scripts. One solution would have been to move my queries to a seperate js file and just import them when I need to, but you then lose the ability to quickly see what your data looks like without having to go to a seperate file. The nice thing about Vue SFC is everything you need is in the same file, so I thought I would do the same thing for my graphql queries.
11+
When writing Vue clients for GraphQL APIs, I've noticed scripts in Vue SFC files have become over-filled with GraphQL queries and had a need to organize the code better without taking away from what makes SFCs great: Having all the code for a single component organized and in one place.
12+
13+
Moving queries to their own files would then create multiple files for a single component, cluttering the project more and reducing productivity in having to write components spanning multiple files.
14+
15+
Enter Vue GQL! I wrote this Vite plugin to allow placing GraphQL queries related to a component directly within the component file without cluttering scripts, by placing them within their own specialized \<gql\> tags.
1216

1317
> ⚠️ This Plugin is still in Development and currently only works with the `<script setup>` format
1418

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite-plugin-vue-gql",
33
"description": "Vue SFC GraphQL Block",
4-
"version": "0.0.4",
4+
"version": "0.0.5",
55
"main": "dist/index.js",
66
"module": "dist/index.m 3E15 js",
77
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)
0