From 0c202e0ef6d6256d1cedc03e7ec3eded554b8046 Mon Sep 17 00:00:00 2001 From: Samuel Andert Date: Mon, 7 Aug 2023 14:43:05 +0200 Subject: [PATCH] adding testcase for graphql queries mapping. --- .../components/refactor/ComposerGraph.svelte | 16 +++ .../components/refactor/ComposerWrap.svelte | 135 ----------------- src/routes/composer/+page.svelte | 136 +++++++++++++++++- src/routes/{test => graphql}/+page.gql | 0 src/routes/graphql/+page.svelte | 58 ++++++++ src/routes/test/+page.svelte | 30 ---- 6 files changed, 207 insertions(+), 168 deletions(-) create mode 100644 src/lib/components/refactor/ComposerGraph.svelte delete mode 100644 src/lib/components/refactor/ComposerWrap.svelte rename src/routes/{test => graphql}/+page.gql (100%) create mode 100644 src/routes/graphql/+page.svelte delete mode 100644 src/routes/test/+page.svelte diff --git a/src/lib/components/refactor/ComposerGraph.svelte b/src/lib/components/refactor/ComposerGraph.svelte new file mode 100644 index 0000000..ce00d1d --- /dev/null +++ b/src/lib/components/refactor/ComposerGraph.svelte @@ -0,0 +1,16 @@ + + +
+
+

My ID is: {$me.id}

+ + My state is: {$me.state} + {#if $me.store.todos} + {#each $me.store.todos as todo} +

{todo.text}

+ {/each} + {/if} +
+
diff --git a/src/lib/components/refactor/ComposerWrap.svelte b/src/lib/components/refactor/ComposerWrap.svelte deleted file mode 100644 index 62f3fa2..0000000 --- a/src/lib/components/refactor/ComposerWrap.svelte +++ /dev/null @@ -1,135 +0,0 @@ - - - diff --git a/src/routes/composer/+page.svelte b/src/routes/composer/+page.svelte index 2785c63..62f3fa2 100644 --- a/src/routes/composer/+page.svelte +++ b/src/routes/composer/+page.svelte @@ -1,5 +1,135 @@ - - + diff --git a/src/routes/test/+page.gql b/src/routes/graphql/+page.gql similarity index 100% rename from src/routes/test/+page.gql rename to src/routes/graphql/+page.gql diff --git a/src/routes/graphql/+page.svelte b/src/routes/graphql/+page.svelte new file mode 100644 index 0000000..3fa1ba7 --- /dev/null +++ b/src/routes/graphql/+page.svelte @@ -0,0 +1,58 @@ + + +{JSON.stringify($queryTest.data, null, 2)} + + diff --git a/src/routes/test/+page.svelte b/src/routes/test/+page.svelte deleted file mode 100644 index 8795a7e..0000000 --- a/src/routes/test/+page.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - - - -