I'm trying to follow the examples to perform an up...
# prisma-client
d
I'm trying to follow the examples to perform an upsert operation with a nested
connectOrCreate
call. The error I'm getting is saying that the
author
arg is unknown. Specifically:
Unknown arg
author
in create.author for type TweetUncheckedCreateInput. Did you mean
authorId
? Available args:
type TweetUncheckedCreateInput {
id: String
authorId: String
createdAt: DateTime
entities?: Json | Null
media?: MediaUncheckedCreateNestedManyWithoutTweetsInput
mediaKeys?: TweetCreatemediaKeysInput | List<String>
publicMetrics: Json
text: String
type?: String | Null
}
The relevant client code is here: https://gist.github.com/marr/c574e7a854223e828e652753d08dd117#file-twitter-ts-L42 and relevant schema is here: https://gist.github.com/marr/0b2e6a58858388df6b448f5d1d2dd879#file-schema-prisma-L23 Can anyone help me troubleshoot this?
n
Hey David 👋 Which example are you following? Which
@prisma/client
version are you using? Are you referring to this snippet? I don’t think you can nest
connectOrCreate
inside upsert statement.