Hello! I’m trying to figure out why am I not getti...
# prisma-whats-new
m
Hello! I’m trying to figure out why am I not getting proper CreateInput interface for one-to-many mutation in my project. I want to use nested mutations, however, my CreateAuthorInput looks like this:
Copy code
name: String!
postsIds: [ID!]
clientMutationId: String!
instead of this:
Copy code
name: String!
postsIds: [ID!]
posts: [AuthorpostsPost!]
clientMutationId: String!
Since it’s missing
posts: [AuthorpostsPost!]
I can’t do a nested create mutation. I created a new project with a same schema and it has correct fields. I also got a server error while copy-pasting and running schema: Request ID: cj3okbkysermh01309qbn0bv2 I don’t know if this is related, but what should I do in this situation? How do I update my relations so they contain
posts: [AuthorpostsPost!]
in CreateInput params? Thank you! UPD: Resolved
Apparently, I was missing the filed because Post only contained system filed + relation. Once I added a title to it (
title: String!
) it became possible to create an author with an array of posts.
n
Hey @makarst I am not quite following - even you fixed this problem, could you please describe the previous error you had here: https://github.com/graphcool/api-bugs/issues/new? 🙏
Thanks so much for the detailed report @makarst 🙂