Hi guys! I would like to extend an object returned...
# prisma-whats-new
s
Hi guys! I would like to extend an object returned from the server but I’m receiving
Uncaught TypeError: Cannot add property logged, object is not extensible
h
Save logged to server?
So client and server state are same?
h
Data received by Graphql clients is not extensible by default. You can still create a new object and do a copy of the received data, then add your property
s
ok thanks šŸ™‚ is it a used pattern?
h
Not much but why wouldn't you use it sporadically? šŸ˜‰
s
ok thx, I use it to compose graphql calls (apollo) to take list of users then append a flag
loggedUser
. I retrieve the logged user using a
loggedInUserQuery