adminjs-prisma
adminjs-prisma copied to clipboard
searchRecords doesn't work with prisma
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.
- [email protected]
- @adminjs/[email protected]
- @adminjs/[email protected]