I was wondering if someone could help me with a "n...
# graphql-nexus
d
I was wondering if someone could help me with a "nexus-plugin-prisma" problem. I have multiple databases so have setup multiple prisma schemas which output seperately (e.g.
generator client {
provider        = "prisma-client-js"
output          = "../db/prisma1"
previewFeatures = ["microsoftSqlServer"]
}
), I then try to run makeSchema like below:
const schema = makeSchema({
types: {
...types,
Query,
Mutation,
},
plugins: [nexusPrisma({})],
outputs: {
schema: __dirname + '/../schema.graphql',
typegen: __dirname + '/generated/nexus.ts'
},
typegenAutoConfig: {
contextType: 'ContextModule.Context',
sources: [
{
source: require.resolve(__dirname + '/../db/prisma1/index.d.ts'),
alias: 'prisma1'
},
{
source: require.resolve(__dirname + '/../db/prisma2/index.d.ts'),
alias: 'prisma2'
},
{
source: require.resolve(__dirname + '/../db/prisma3/index.d.ts'),
alias: 'prisma3'
},
{
source: require.resolve('./context'),
alias: 'ContextModule'
}
]
}
})
However it doesn't seem to be able to resolve any of the prisma clients and I get the following error
Error: You most likely forgot to initialize the Prisma Client.
r
Hey @Dave 👋 This currently isn’t possible, so it would be great if you could create a feature request here 🙂