Skip to content
Discussion options

You must be logged in to vote

@ludralph Thank you very much for offering your help; it is much appreciated.

I am trying to create a project where I need to connect it with existing users by passing their IDs in the data.

However, when I attempt to remove the Prisma.ProjectCreateInput and replace it with any, it worked perfectly.

While this approach worked, I found that ProjectCreateInput does not include the user_ids array. I also attempted to use Prisma.ProjectUncheckedCreateInput, but it resulted in errors when using the map functions.

This is what I went with as a solution:

 createProjectWithUsers(data: any) {
    return this.prisma.project.create({
      data: {
        ...data,
        users: {
          connect:…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ludralph
Comment options

@wassimbenr
Comment options

@ludralph
Comment options

@wassimbenr
Comment options

Answer selected by ludralph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants