typescript-graphql-server icon indicating copy to clipboard operation
typescript-graphql-server copied to clipboard

Documentation for "Static type generation"

Open Slessi opened this issue 7 years ago • 1 comments

In the Advanced README, the following is mentioned:

Static type generation: TypeScript types for GraphQL queries & mutations are generated in a build step

But I can't seem to find any indication on how to generate these types, is there some documentation somewhere that I am not seeing?

Slessi avatar Jul 16 '18 15:07 Slessi

Had the same problem but for the Basic README (only prisma-bindings). Here's how i got it solved: https://www.prisma.io/docs/reference/prisma-bindings/code-generation-cosha9rah3

So call prisma-binding --language typescript --outputBinding src/generated/prisma.ts or better configure in graphqlconfig.yml as described in the doc above and hook to the post-deploy hook in prisma.yml

dbuezas avatar Nov 06 '18 11:11 dbuezas