Prisma.graphql vs prisma-schema.ts


#1

What is the difference between those two files (one generated by graphql-schema and the other by typescript-client). It seems that prisma-schema.ts is just prisma.graphql wrapped in a string and exported.

Are there any situations you want to use one over the other? Right now I need to generate both as one is used by prisma-client and I need the other to import types in my application schema.


#2

Hi @petr.peller

The output of both the files is same but the format is different. In order to convert the prisma-schema.ts you will need to call gql in order to convert it into a graphQL document. For the other you will require a file loader.


#3

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.