Codegen
Given it's configuration, creates a typed gqless client from a graphql endpoint/schema.
Installation#
Install the following dependencies to your project:
- pnpm
- npm
- yarn
Command#
After @gless/cli is installed in your package, you should add a script in your package.json.
Then, you can execute:
- pnpm
- npm
- yarn
Format output code#
The CLI code generator comes with built in support for formatting code using Prettier. The config search will start at the output directory and will continue up the directories tree.
Default client generated code#
By default with react & subscriptions turned on, the generated client files should look like this:
You can modify this file safely, and each client has configurations you can set.