TypeError: Cannot assign to read only property of object

1.1k Views Asked by At

I have an angular application which has a form. I have my backend APIs written in Graphql. I am fetching data using Apollo Angular library to populate the fields within the form (which uses ngModel for binding) for my application user. I have given the user the ability to go ahead and edit the fields within the form. I, however, am getting the following error while changing the values of the the fields. From what I have read it is happening because the cache values in apollo angular are immutable. How do I still allow the user to change the fields within the form? Is there a proper solution or a workaround available for such issues?

core.js:4197 ERROR TypeError: Cannot assign to read only property 'name' of object '[object Object]'

Thank you.

0

There are 0 best solutions below