hinsxd
11/05/2018, 7:33 PMgraphqlgen too, but where could I get/generate ./src/types.ts:? I am using JS prisma client. Should I just mirror the datamodal to types.ts?weakky
11/05/2018, 11:11 PM./src/types.ts file is something you have to create by hand. It should contains all the ‘hand-written’ typescript types that maps your GraphQL types. If you’re too lazy to do so, what you can do is to create an empty ./src/types.ts file, and run graphqlgen.
You will be given as output all the missing typescript types that you need to c&p into your ./src/types.ts file.
Be aware that for now, all types that aren’t scalar are outputed as any type, which you should manually replace by their correct types. Hopefully that clarifies your question!hinsxd
11/06/2018, 4:37 AMtypes.ts should be mirroring schema.graphql?weakky
11/06/2018, 10:25 AMtypes.ts file should indeed mirror the types from your prisma api, but should not necessarily mirror the types from your graphql server on top of prisma. In fact, if you are using prisma-client, which I forgot to ask you, then you can just use the generated './src/generated/prisma-client/index.ts' file instead of creating your own types.ts file!hinsxd
11/07/2018, 8:42 AM