added basic graphql mapping

This commit is contained in:
Samuel Andert
2023-08-07 15:01:30 +02:00
parent 0c202e0ef6
commit 783548581c
3 changed files with 63 additions and 39 deletions

View File

@ -12,5 +12,10 @@
<p>{todo.text}</p>
{/each}
{/if}
<br />
dataTest:
{#if $me.x}
{JSON.stringify($me.x)}
{/if}
</section>
</div>

View File

@ -59,6 +59,15 @@
if (component.data?.map) {
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) => ({
...storeValue,