Replies: 1 comment
-
I am not able to reproduce this. Doing something like this: const u: UserData = {
email: '[email protected]',
password: 'supersecret'
}
console.log(await app.service('users').create(u))
console.log(u) In the feathers-chat leaves the original object unmodified. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing some tests on a service, that have resolvers.
This seems a bit strange for me, I would have thought
payload
was immutable.I encounter some issues when giving the same payload through several calls to the service, as my validator breaks if
myProp3
is unwanted.I fix it by destructuring the payload with
.create({...payload})
, but I don't have a nested payload so it's simple.Do you think this is ok to have a mutable payload ? Or wouldn't it be better to have an immutable payload ?
Beta Was this translation helpful? Give feedback.
All reactions