Hi, my team is looking to migrate from prisma1 to ...
# orm-help
e
Hi, my team is looking to migrate from prisma1 to prisma2 and a core pillar of our stack is using graphql-codegen to generate the typescript for both our prisma and graphql schemas. I noticed that in prisma2 the schema.prisma is generated directly into typescript and sent to the node_modules/.prisma/client folder and there is no longer a generated graphql file. Currently we are importing that generated prisma graphql file into our graphql.schema file which is then used to generate our typescript types using the codegen tool. My fear is that if we upgrade to prisma2, we would lose out on being able to reference the prisma types in the graphql.schema and wouldn't be able to generate our types. Are there any good workarounds for this?
r
@Evan Kolb 👋 As Prisma 2 is not an ORM, there are a couple of libraries to use to expose
schema.prisma
in the form of GraphQL types: 1. TypeGraphQL Prisma 2. Pal.js Using any of the above, you would be able to get the same generated GraphQL types for your app 🙂
e
@Ryan thank you so much! I will definitely check those out
🙌 1