adminjs
adminjs copied to clipboard
[Bug]: The documentation of the @adminjs/relatoins example is incorrect
Contact Details
https://discord.com/channels/1134390757755723816/1134399045155180554/1286417341923459103
What happened?
Please update the documentation for your paid @adminjs/relations plugin with the @adminjs/prisma adapter. It has a very unclear behavior.
In your documentation there is an example of options for a resource where you explicitly specify users organizationId and personId:
But it doesn't work and returns very unclear behavior (infinite bootloader) and an error message:
Instead of organizationid it should just point to organization.
Related to this: https://github.com/SoftwareBrothers/adminjs/issues/1619
Bug prevalence
At first interaction with paid plugin
AdminJS dependencies version
"@adminjs/express": "^6.1.0"
"@adminjs/nestjs": "^6.1.0"
"@adminjs/prisma": "^5.0.3"
"@adminjs/relations": "^1.1.2"
What browsers do you see the problem on?
Chrome
Relevant log output
[22:00:07.338] ERROR (31474): Cannot read properties of null (reading 'type')
err: {
"type": "TypeError",
"message": "Cannot read properties of null (reading 'type')",
"stack":
TypeError: Cannot read properties of null (reading 'type')
at file:///Users/tonypinkevych/Documents/education/node_modules/@adminjs/prisma/src/utils/converters.ts:39:84
at Array.reduce (<anonymous>)
at convertFilter (file:///Users/tonypinkevych/Documents/education/node_modules/@adminjs/prisma/src/utils/converters.ts:38:34)
at Resource.find (file:///Users/tonypinkevych/Documents/education/node_modules/@adminjs/prisma/src/Resource.ts:88:14)
at oneToManyHandler (file:///Users/tonypinkevych/Documents/education/node_modules/@adminjs/relations/lib/actions/one-to-many/one-to-many.handler.js:1:607)
at file:///Users/tonypinkevych/Documents/education/node_modules/@adminjs/relations/lib/actions/relations.handler.js:1:727
at file:///Users/tonypinkevych/Documents/education/node_modules/adminjs/lib/backend/decorators/action/action-decorator.js:98:90
}
Relevant code that's giving you issues
Can be taken from this example: https://docs.adminjs.co/basics/features/relations. Just copy paste into a project and it doesn't work