paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
684 stars 54 forks source link

Support for passing a specific prisma client in plugins #139

Closed roderickhodgson closed 3 years ago

roderickhodgson commented 3 years ago

Hi Ahmed,

I notice the plugins import the dmmf from '@prisma/client'. This causes an issue when using a custom path for the generated prisma client.

For example with this directive in the schema

generator client {
  provider = "prisma-client-js"
  output   = "../generated/database/client"
}

This is a likely scenario if building a GraphQL with multiple data sources, and therefore using more than one prisma client.

Would it be possible to support passing the client to the plugin?

Thanks!

AhmedElywa commented 3 years ago

@roderickhodgson, thanks for your issue. I am already working on that.

AhmedElywa commented 3 years ago

@roderickhodgson please update to last version https://github.com/paljs/prisma-tools/releases/tag/v2.5.0