Title
d

Dev__

12/14/2021, 5:05 PM
when using a create
.create
it seems that I cannot use the following combination
.create({
    relationAId: id,
    relationBId: {
        connectOrCreate: ...
    }
})
any reason why this isnt made possible?. TS gives me an error
m

Maciek K

12/14/2021, 5:16 PM
Would be better if you have shared your schema but I'm betting you probably want to use the field where you have
@relation
for the second line:
.create({
    relationAId: id,
    relationB: {
        connectOrCreate: ...
    }
})
d

Dev__

12/15/2021, 7:55 AM
my question is actually, why cant I use a combination of
CreateInput
(using
connect
) and
UncheckedCreateInput
(using
id
directly)