I have such mutation - <https://gist.github.com/Si...
# orm-help
g
I have such mutation - https://gist.github.com/SilencerWeb/9384ffc2ef12cd3fdf718f1834808493 You can see the mutation and call example on this gist. I cannot understand why I get
[ { side: 'left' }, { side: 'left' } ]
here - https://gist.github.com/SilencerWeb/9384ffc2ef12cd3fdf718f1834808493#file-index-js-L46 instead of something like
[ { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' }, { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' } ]
. Strange part is that these created `ActionMember`s are saved in the database correctly -
[ { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' }, { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' } ]
, but I get another result in my
console.log
. What can be the reason of such behavior?
m
person
is a connected field - it connects
Action
with
Person
. ID representation in Prisma Clout is solely a representation. To obtain the id you’ve got to query it like
{ person { id } }
. Bear in mind that this would require you to pass in
info
parameter when executing create request, as, by default, they only return one-level deep scalar fields.