Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"UpdateManyMutationInput" empty for a joining table #36

Closed
lukigarazus opened this issue Nov 24, 2020 · 1 comment
Closed

"UpdateManyMutationInput" empty for a joining table #36

lukigarazus opened this issue Nov 24, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@lukigarazus
Copy link

I have a simple app with the following Prisma schema:

model TodoViewTodo {
  id          Int      @id @default(autoincrement())
  todo        Int
  todoView    Int
  placeholder String?
  Todo        Todo     @relation(fields: [todo], references: [id])
  TodoView    TodoView @relation(fields: [todoView], references: [id])
}

model Todo {
  id           Int            @id @default(autoincrement())
  text         String
  done         Boolean?
  user         Int
  User         User           @relation(fields: [user], references: [id])
  TodoViewTodo TodoViewTodo[]
}

model TodoView {
  id           Int            @id @default(autoincrement())
  label        String
  order        String?
  color        String
  TodoViewTodo TodoViewTodo[]
}

When I generate a schema using typegraphql-prisma resolvers and buildSchema I get an empty input:

input TodoViewTodoUpdateManyMutationInput

which causes all GraphQL operations to fail due to an invalid schema.

I had to add the placeholder field for this input not to be empty, which is not ideal.

@MichalLytek
Copy link
Owner

Duplicate of #19 🔒

@MichalLytek MichalLytek added the duplicate This issue or pull request already exists label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants