graphql-nexus / nexus-prisma

Prisma plugin for Nexus
https://graphql-nexus.github.io/nexus-prisma
MIT License
564 stars 45 forks source link

Improve post-generation log message #46

Open jasonkuhrt opened 3 years ago

jasonkuhrt commented 3 years ago

What

image

jasonkuhrt commented 3 years ago

Hey @nikolasburk can you help with: Link pris.ly/d/nexus-prisma doesn't work?

Hey @Jolg42 can you help with Wrong location, should be after the generated nexus prisma to ...?

nikolasburk commented 3 years ago

can you help with: Link pris.ly/d/nexus-prisma doesn't work?

Sure, what exactly needs to be done here?

Jolg42 commented 3 years ago

@jasonkuhrt You mean

This ✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 151ms

Should be ✔ Generated Prisma Client (2.22.0) to ./node_modules/nexus-prisma/dist/runtime in 151ms ?

jasonkuhrt commented 3 years ago

@nikolasburk I need to setup that shortlink to point to this repo's README.

@Jolg42 No,

Instead of this:

You can now start using Nexus Prisma in your code. Reference: https://pris.ly/d/nexus-prisma

✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 122ms

✔ Generated Nexus Prisma to ./node_modules/nexus-prisma/dist/runtime in 3.26s
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

It should be:

✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 122ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

✔ Generated Nexus Prisma to ./node_modules/nexus-prisma/dist/runtime in 3.26s
You can now start using Nexus Prisma in your code. Reference: https://pris.ly/d/nexus-prisma
jasonkuhrt commented 3 years ago

@Jolg42 this is the code https://github.com/prisma/nexus-prisma/blob/feat/allow-custom-context-property-name/src/cli/nexus-prisma.ts#L29-L36 where the log output I am writting is. I assume I'm putting it in the wrong place.

Jolg42 commented 3 years ago

We already log it from here https://github.com/prisma/prisma/blob/master/src/packages/cli/src/Generate.ts#L269

nikolasburk commented 3 years ago

Done ✅ https://pris.ly/d/nexus-prisma

jasonkuhrt commented 3 years ago

@Jolg42 I'm talking about the Nexus Prisma log. Sorry my example above was broken. Fixed now.