{"id":42751,"library":"feathers-prisma","title":"feathers-prisma","description":"A Feathers service adapter for the Prisma ORM, enabling CRUD operations via Feathers methods (find, get, create, update, patch, remove) with support for Prisma-specific features like relation eager loading ($eager), full-text search ($search), and raw Prisma filters ($prisma). Current stable version is 0.7.0, requiring Prisma v5 and Feathers v4. Release cadence is moderate with breaking changes between major Prisma version bumps. Key differentiators: integrates Feathers query syntax with Prisma's powerful filtering, allows batched operations, and provides a whitelist-based safety model for allowed query operators.","status":"active","version":"0.7.0","language":"javascript","source_language":"en","source_url":"git://github.com/ps73/feathers-prisma","tags":["javascript","feathers","prisma","feathers-plugin","postgresql","mariadb","mysql","mssql","sqlite","typescript"],"install":[{"cmd":"npm install feathers-prisma","lang":"bash","label":"npm"},{"cmd":"yarn add feathers-prisma","lang":"bash","label":"yarn"},{"cmd":"pnpm add feathers-prisma","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides adapter utilities like pagination and error handling","package":"@feathersjs/adapter-commons","optional":false},{"reason":"Core Feathers framework dependency","package":"@feathersjs/feathers","optional":false},{"reason":"Feathers error types for consistent error handling","package":"@feathersjs/errors","optional":false},{"reason":"Prisma ORM client for database operations","package":"@prisma/client","optional":false}],"imports":[{"note":"ESM-only package; CJS require will not work in Node >=16 with default module resolution.","wrong":"const { service } = require('feathers-prisma')","symbol":"service","correct":"import { service } from 'feathers-prisma'"},{"note":"FeathersPrismaService is a named export, not default.","wrong":"import FeathersPrismaService from 'feathers-prisma'","symbol":"FeathersPrismaService","correct":"import { FeathersPrismaService } from 'feathers-prisma'"},{"note":"Default export exists but is not recommended; prefer named exports for clarity.","wrong":"import { default as feathersPrisma } from 'feathers-prisma'","symbol":"default","correct":"import feathersPrisma from 'feathers-prisma'"}],"quickstart":{"code":"import feathers from '@feathersjs/feathers';\nimport { service } from 'feathers-prisma';\nimport { PrismaClient } from '@prisma/client';\n\nconst app = feathers();\nconst prismaClient = new PrismaClient();\nprismaClient.$connect();\napp.set('prisma', prismaClient);\n\nconst paginate = { default: 10, max: 50 };\napp.use('/messages', service({\n  model: 'message',\n  paginate,\n  multi: ['create', 'patch', 'remove'],\n  whitelist: ['$eager']\n}, prismaClient));\n\nconst msgs = await app.service('messages').find({\n  query: { $limit: 5, $eager: ['recipients'] }\n});\nconsole.log(msgs);","lang":"typescript","description":"Set up a Feathers app with Prisma adapter, configure pagination, and perform a simple find with eager loading."},"warnings":[{"fix":"Add the required operator names to the 'whitelist' array in service options.","message":"Whitelist must include $eager, $prisma, etc. before use, otherwise service will throw an error","severity":"gotcha","affected_versions":"*"},{"fix":"Downgrade to v0.6.0 if using Prisma v3, or upgrade Prisma to v5.","message":"Prisma v3 users must use feathers-prisma v0.6.0; v0.7.0+ requires Prisma v5","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Replace $rawWhere with $prisma in query objects.","message":"$rawWhere property is deprecated since v0.7.0; use $prisma instead","severity":"deprecated","affected_versions":">=0.7.0"},{"fix":"Specify the methods you want to allow multi: ['create', 'patch', 'remove'] in service options.","message":"Batch operations (multi) must be explicitly allowed via the 'multi' option; otherwise array input throws","severity":"gotcha","affected_versions":"*"},{"fix":"Implement custom error middleware or use Feathers hooks to map Prisma errors.","message":"Feathers adapter global error handling may not catch Prisma-specific errors (e.g., unique constraint)","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'0.7.0':50 'adapt':7 'allow':80,92 'base':88 'batch':81 'break':62 'bump':68 'cadenc':58 'chang':63 'creat':20 'crud':13 'current':46 'differenti':70 'eager':33,35 'enabl':12 'feather':2,5,16,55,72,96,99 'feathers-plugin':98 'feathers-prisma':1 'featur':30 'filter':44,79 'find':18 'full':37 'full-text':36 'get':19 'integr':71 'javascript':95 'key':69 'like':31 'load':34 'major':65 'mariadb':102 'method':17 'model':90 'moder':60 'mssql':104 'mysql':103 'oper':14,82,94 'orm':11 'patch':22 'plugin':100 'postgresql':101 'power':78 'prisma':3,10,28,43,45,52,66,76,97 'prisma-specif':27 'provid':84 'queri':73,93 'raw':42 'relat':32 'releas':57 'remov':23 'requir':51 'safeti':89 'search':39,40 'servic':6 'specif':29 'sqlite':105 'stabl':47 'support':25 'syntax':74 'text':38 'typescript':106 'updat':21 'v4':56 'v5':53 'version':48,67 'via':15 'whitelist':87 'whitelist-bas':86","created_at":"2026-06-05T16:56:29.960132+00:00","updated_at":"2026-06-05T16:56:29.960132+00:00","problems":[{"fix":"Use import { service } from 'feathers-prisma' instead of require().","cause":"Using require() in an ESM-only package context.","error":"TypeError: Cannot destructure property 'service' of 'require(...)' as it is undefined."},{"fix":"Provide a model option: { model: 'message' }.","cause":"Omitting the model name in the service options object.","error":"Error: The \"model\" option is required."},{"fix":"Add '$eager' to the whitelist array in the service options.","cause":"Using $eager in query without adding it to the whitelist option.","error":"Error: $eager is not allowed. Please add it to the whitelist."},{"fix":"Include 'create' in the multi array: multi: ['create'].","cause":"Passing an array to create() without allowing multi: ['create'] in options.","error":"Error: Multi-create is not allowed for the 'create' method."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ps73/feathers-prisma","github":"git://github.com/ps73/feathers-prisma","docs":null,"changelog":null,"pypi":null,"npm":"feathers-prisma","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}