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

searchRecords doesn't work with prisma #10

Open
Malin88 opened this issue May 11, 2022 · 0 comments
Open

searchRecords doesn't work with prisma #10

Malin88 opened this issue May 11, 2022 · 0 comments

Comments

@Malin88
Copy link

Malin88 commented May 11, 2022

When I use prisma adapter and I try to search through the records in my custom component in this way:

const promiseOptions = (inputValue: string, callback) => {
    if (!inputValue) {
      callback([]);
    } else {
      api
        .searchRecords({
          resourceId: 'Translation',
          query: inputValue,
        })
        .then((results) => {
          console.log(results);
        });
    }
  };

I get the following error:

Error: 
Invalid `prisma.translation.findMany()` invocation:

{
  where: {
    id: null
        ~~~~
  },
  skip: 0,
  take: 50,
  orderBy: {
    id: 'asc'
  }
}

Argument id for where.id must not be null. Please use undefined instead.
@dziraf dziraf transferred this issue from SoftwareBrothers/adminjs May 12, 2022
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