Skip to content

Prisma Extension documentation improvements #2167

Open
@lucafaggianelli

Description

@lucafaggianelli

Hey,

Just wanted to suggest a few improvements to the docs for the Prisma Extension as it took me a bit to understand how to use it.

TL;DR This is my prismaExtension config that works with multiple Prisma generators and multiple schema files:

prismaExtension({
  schema: 'prisma/schema/schema.prisma',
  clientGenerator: 'client',
}),

These are the problems I encountered

Error not installing the extension at all

In the beginning I didn't use the extension at all and I received this error in trigger, which took me a while to understand I needed the extension at all:

Prisma Client could not locate the Query Engine for runtime "debian-openssl-3.0.x".

👉 Solution: add a troubleshoot / FAQ section saying that if you receive this error, just install prisma extension
and don't care about Prisma suggestion to add the debian binary as that's handled automatically by Trigger.

Multiple Prisma schema files

The docs at https://trigger.dev/docs/config/extensions/prismaExtension says:

You can use prismaSchemaFolder to specify just the directory containing your schema file, instead of the full path

Though this is not true as prismaSchemaFolder doesn't exist in prismaExtension or I don't know where it is, in anycase for me the solution was to point to the main schema file and not to the folder of schemas as that throws an error (see #1635)

👉 Solution: add a section saying that for multiple schema files the schema property should point to the main schema file and not to the folder.

Multiple Prisma generator

I'm not sure about how this impact the functionality of the extension, personally I have multiple generators (the client and the JSON ones) and I set clientGenerator: 'client' though I didn't try without it, does the JSON generator harm the extension? also it would be worth clarifying that clientGenerator accepts the generator ID and not the provider, that is "prisma-client-js"

👉 Solution: Clarify

Happy to help with a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions