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

getBookmarks By UserId dont work #14

Open
YanirMidler24 opened this issue Jun 7, 2023 · 0 comments
Open

getBookmarks By UserId dont work #14

YanirMidler24 opened this issue Jun 7, 2023 · 0 comments

Comments

@YanirMidler24
Copy link

When i try to run the test for getBookmarks i get an error :

Unknown arg userId in where.userId for type BookmarkWhereInput. Did you mean id? Available args:
type BookmarkWhereInput {
AND?: BookmarkWhereInput | List
OR?: List
NOT?: BookmarkWhereInput | List
id?: IntFilter | Int
createdAt?: DateTimeFilter | DateTime
updatedAt?: DateTimeFilter | DateTime
title?: StringFilter | String
description?: StringNullableFilter | String | Null
link?: StringFilter | String
}

this is my prisma model :

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  email String @unique
  hash  String

  firstName String?
  lastName  String?

  bookmarks Bookmark[]

  @@map("users")
}

model Bookmark {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  title       String
  description String?
  link        String

  userId Int
  user   User @relation(fields: [userId], references: [id])

  @@map("bookmarks")
}

why i got this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant