From 56059c8cce9aafc5a5c67bcafab4b840130f1e80 Mon Sep 17 00:00:00 2001 From: Scott Tolinski Date: Wed, 29 Sep 2021 11:11:21 -0600 Subject: [PATCH] adds basic api preview --- README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66feda2..1f4082f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,61 @@ # qQuery -## +## Not like jQuery. A GraphQL Fetcher & Cache for Svelte Kit + +### UnderConstruction.gif + +More information in this space soon. API is very much in flux rn. + +### Preview + +## gFetch + +The graphql fetcher client. + +Initialize + +``` +export const g = new GFetch({ + path: Environment.apiURL +}) +``` + +Fetch + +``` +const seriesList = ({ variables}) => + g.fetch({ + queries: [{ query: SeriesListDoc, variables }], + }) + +``` + +Cache and Fetch + +``` +export async function getSeriesList(variables) { + await gQuery('seriesList', { query: seriesList, variables }) +} +``` + +Use + +``` + + + + +```