Preview feature feedback: Node-API support (`nApi`)
See original GitHub issuePlease share your feedback about the nApi
functionality released in v2.20.0 in this issue.
- If you encounter a bug, please open a bug report in this repo.
- If the feature is working well for you, please share this in a comment below or leave a 👍 on this issue.
If you have any questions, don’t hesitate to ask them in the #prisma-client
channel in the Prisma Slack.
Known Limitations
- (Resolved) You can’t have more than one instance of the Prisma Client yet, so this will not work properly:
const prisma1 = new PrismaClient() const prisma2 = new PrismaClient()
- (Resolved) Currently, logging queries does not work with Node-API and Jest (Issue). For example, the following will not output any query logs. (Note: This seems to only be the case when using jest)
const prisma = new PrismaClient({ log: ['query'] })
- (Resolved) Node-API libraries do not work with process mocking of Jest (issue)
- Node-API does not work on M1 ARM Macs, Apple Silicon (issue)
- Node-API does not work on 32bit Node (issue)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:51 (32 by maintainers)
Top Results From Across the Web
How We Migrated Realm JavaScript From NAN to N-API
The Realm JavaScript team has reimplemented the Realm JS Node.js SDK from the ground up to use N-API. Here we describe how and...
Read more >Node-API | Node.js v19.3.0 Documentation
Node -API (formerly N-API) is an API for building native Addons. It is independent from the underlying JavaScript runtime (for example, V8) and...
Read more >What's new in Prisma? (Q3/2021)
In 2.20.0 we introduced a Preview feature, the Node-API library, as a more efficient way to communicate with the Prisma Engine binary.
Read more >Next Generation N-API - SlideShare
The world of Node native add-on development continues to rapidly evolve. After widespread adoption of N-API starting last year, the Node ...
Read more >Node.js Archives - Page 3 of 6 - OpenJS Foundation
js project. N-API has always stood for Node-API but was often pronounced NAPI. A concern was raised, that when pronounced that way, it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Originally posted here: #5792.
I had a major performance drawback when I was migrating from sequelize and seems the
nApi
solved it for me. Here are the details:Environment
Prisma schema:
DB: employees_db
Code:
Results:
Full code here: https://github.com/k-sae/employees_prisma
Throughput solved in latest dev.