Is there a way to generate javascript files instead of typescript?
Maybe adding something to the generate command.
npx nexus-prisma-generate --client ./src/generated/prisma-client --output ./src/generated/nexus-prisma
I get the below error when trying to use with a javascript project. I think the problem is that the generated/nexus.ts and generated/schema.graphql files are not getting generated.
Expected path for outputs.typegen to be a string, saw src/generated/nexus.ts
Hey there,
nexus-prisma-generate does have an option to generate javascript file, just add --js in your command such as:
npx nexus-prisma-generate --client ./src/generated/prisma-client --output ./src/generated/nexus-prisma --js
That's something we should better document though, so I'll keep this issue opened til we document that.
For the record, here's the help of the nexus-prisma-generate CLI
nexus-prisma-generate prisma-client-dir output
> Generate the TypeScript types for nexus-prisma
-----
Inputs should be relative to the root of your project
--client (required): Path to your prisma-client directory (eg: ./generated/prisma-client/)
--output (required): Path to directory where you want to output the typings (eg: ./generated/nexus-prisma)
--js (optional): Whether to generate the types for Javascript
Hi, I with Relay as front-end framework, that mean I need connectionType for pagination and I found that Prisma2(I just try it in the past few days, I really like it) may not compatible with nexus-prisma-generate, right? so, I need implement it by myself? (I just wonder if it has been implemented and not document yet maybe)
Most helpful comment
Hey there,
nexus-prisma-generatedoes have an option to generate javascript file, just add--jsin your command such as:npx nexus-prisma-generate --client ./src/generated/prisma-client --output ./src/generated/nexus-prisma --jsThat's something we should better document though, so I'll keep this issue opened til we document that.
For the record, here's the help of the
nexus-prisma-generateCLI