diff --git a/README.md b/README.md index 1f4082f..8624152 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![gQuery](./gQuery.png) + # qQuery ## Not like jQuery. A GraphQL Fetcher & Cache for Svelte Kit @@ -8,11 +10,57 @@ More information in this space soon. API is very much in flux rn. ### Preview +## 🪄 Magic Mode + +Magic mode is the preferred way of using gQuery. Not because it's magical, but because it's easy. + +### 1. Initialize G + +``` +export const g = new GFetch({ + path: Environment.apiURL //whatever your api url is here +}) +``` + +### 2. Add GraphQL Codegen Plugin + +docs coming soon + +### 3. Run GraphQL Codegen + +docs coming soon + +### 4. Use that thang + +``` + + + + +``` + +## Manual Mode + +I guess if you want to do it this way you can. + ## gFetch The graphql fetcher client. -Initialize +### 1. Initialize ``` export const g = new GFetch({ @@ -59,3 +107,13 @@ Use ``` + +## FAQ / WTF + +### Q? How tf do I update the cache? + +It's a Svelte Writable Store. So after a mutation you can quickly and easily manually update the cache. + +### Q? Can't you update the cache magically for me? + +Maybe? If you want to be in charge of writing that bit, the door is open 😼 diff --git a/gQuery.png b/gQuery.png new file mode 100644 index 0000000..93533b5 Binary files /dev/null and b/gQuery.png differ