prisma-engines icon indicating copy to clipboard operation
prisma-engines copied to clipboard

AST schema doesn't match the actual runtime types for nested creates

Open steebchen opened this issue 3 years ago • 0 comments

In @prisma/[email protected] / engines@58369335532e47bdcec77a2f1e7c1fb83a463918 the DMMF schema changed from nested many creates from an array to a non-array type:

image

This used to be a an array before:

mutation {
  user: createOneUser(
    data: {
      id: "44444"
      email: "[email protected]"
      username: "johndoe"
      name: "John"
      posts: {
        create: [{ id: "4444444", title: "common", content: "4444444" }]
        #       ^ is not an array anymore
      }
    }
  ) {
    id
  }
}

However, everything works as expected at runtime, I think just the type information is not correct anymore. You can see that there’s an error that the type doesn’t match, but the query runs:

image

steebchen avatar Nov 11 '20 14:11 steebchen