diff --git a/src/lib/components/refactor/ComposerGraph.svelte b/src/lib/components/refactor/ComposerGraph.svelte
index e517d7b..bc3cfa0 100644
--- a/src/lib/components/refactor/ComposerGraph.svelte
+++ b/src/lib/components/refactor/ComposerGraph.svelte
@@ -14,8 +14,8 @@
{/if}
dataTest:
- {#if $me.x}
- {JSON.stringify($me.x)}
+ {#if $me.store}
+ {JSON.stringify($me.store.test)}
{/if}
diff --git a/src/lib/core/refactor/Composer.svelte b/src/lib/core/refactor/Composer.svelte
index baba950..5d63e3c 100644
--- a/src/lib/core/refactor/Composer.svelte
+++ b/src/lib/core/refactor/Composer.svelte
@@ -60,13 +60,15 @@
subscribeAndMapQueries(component.id, component.data.map);
}
if (component.data?.gql) {
- getComposerStore(component.id).update((storeValue) => ({
- ...storeValue,
- x: {
- ...storeValue.x,
- ...component.data.gql
- }
- }));
+ getComposerStore(component.id).update((storeValue) => {
+ return {
+ ...storeValue,
+ store: {
+ ...storeValue.store,
+ ...component.data.gql
+ }
+ };
+ });
}
}
getComposerStore(component.id).update((storeValue) => ({
diff --git a/src/routes/graphql/+page.gql b/src/routes/graphql/+page.gql
index bddea90..55cccf6 100644
--- a/src/routes/graphql/+page.gql
+++ b/src/routes/graphql/+page.gql
@@ -2,5 +2,6 @@ query queryTest {
repoGet(owner: "samuelandert.eth", repo: "learn") {
id
name
+ link
}
}
diff --git a/src/routes/graphql/+page.svelte b/src/routes/graphql/+page.svelte
index bc5416c..6a9e433 100644
--- a/src/routes/graphql/+page.svelte
+++ b/src/routes/graphql/+page.svelte
@@ -1,8 +1,7 @@
-{#if $queryTest}
- {JSON.stringify($queryTest.data, null, 2)}
-{/if}
-