timhall / svelte-apollo

Svelte integration for Apollo GraphQL
MIT License
944 stars 69 forks source link

How to edit the data being returned? #125

Closed ikudosi closed 1 year ago

ikudosi commented 1 year ago

I have a page that uses graphql to fetch the data and populate a form. I was able to do a bind:value on my $page.data.shopifyStore variable, however, as soon as I type in the fields to edit I get a Uncaught TypeError: Cannot assign to read only property 'name' of object '#<Object>.

Is there a way to not make the data read only?

ikudosi commented 1 year ago

I think I managed to resolve this by using subscribe() instead of query().