The GraphQL Code-Generator also support
require extensions - that means that you can load any external files without the need to transpile it before.
How to use it?
To use it, install the extensions you wish to use from npm and then specify a list of
require extensions in your root config:
require: - extension1 - extension2
require extension is useful if you are loading your
GraphQLSchema or GraphQL documents from a code file, if you wish to use custom plugins, or use a custom schema loader or a custom document loader.
If you wish to use TypeScript, just add
ts-node from npm, and specify it's register export in your config file:
require: - ts-node/register