remapping gql from placeholder to $me.store

This commit is contained in:
Samuel Andert
2023-08-07 15:29:02 +02:00
parent 783548581c
commit cbf059acca
4 changed files with 14 additions and 19 deletions

View File

@ -14,8 +14,8 @@
{/if}
<br />
dataTest:
{#if $me.x}
{JSON.stringify($me.x)}
{#if $me.store}
{JSON.stringify($me.store.test)}
{/if}
</section>
</div>

View File

@ -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) => ({