aboutsummaryrefslogtreecommitdiff
path: root/playground/src/App.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'playground/src/App.svelte')
-rw-r--r--playground/src/App.svelte23
1 files changed, 23 insertions, 0 deletions
diff --git a/playground/src/App.svelte b/playground/src/App.svelte
new file mode 100644
index 0000000..82a8c9d
--- /dev/null
+++ b/playground/src/App.svelte
@@ -0,0 +1,23 @@
+<script lang="ts">
+ /*** IMPORT ------------------------------------------- ***/
+
+ import { createHttpFetcher } from "../../source/library/index.ts";
+ import GraphiQL from "../../source/library/GraphiQL.svelte";
+
+ /*** UTILITY ------------------------------------------ ***/
+
+ const fetcher = createHttpFetcher({
+ url: "https://countries.trevorblades.com/"
+ });
+
+ const initialQuery = `query Countries {
+ countries {
+ code
+ name
+ emoji
+ }
+}
+`;
+</script>
+
+<GraphiQL {fetcher} {initialQuery}/>