With the new prisma-client, how can we convenientl...
# orm-help
x
With the new prisma-client, how can we conveniently import the generated type to our app's
schema.graphql
like we previously did from
src/generated/prisma.graphql
? Do we need to copy and paste the type to
schema.graphql
now? Previously I think we can do
# import User from './generated/prisma.graphql'
if we want to use the
User
type in
schema.graphql
, but now in prisma-client, the schema is defined in a
.js
file and I am not sure how to import that.
g
I’m facing the same problem, any hint on this one @nilan ?
Oh, just fixed it by adding an extra step to the generate pipeline:
Copy code
generate:
  - generator: typescript-client
    output: ../src/generated/
  - generator: graphql-schema
    output: ../src/generated/
Note: I had
graphql get-schema --project database
under my post-deploys hooks that was failing silently.
❤️ 2