VS code extension: graphql-codegen - README
GraphQL Codegen is one of the best tools to achieve E2E type safe GraphQL apps. This project is a simple VS code extensions that makes it easier to use the tool in VS code.
This VS code extension is built on top of graphql-codegen and hence inherits almost all the features of graphql-codegen.
Few key features are:
All the dependencies and plugins are pre-installed and hence it requires zero configuration to start with
Once you are familiar with the graphql-codegen tool, you may install the VS code extension, add config file and start using the benefits already.
Extension configuration. The following two things can be configured by creating a JSON file
- By default the extension looks for
codegen.yml at the root directory. To use any other file as config file, add
"configFile": "newFilePath" tot he JSON file
- By default, the types/code are generated only on Keyboard shortcuts or Command as mentioned below. To generate types on every save of the files, add
"onSave": true to the JSON.
It has a dedicated Output screen with
Error Logs with time and detailed message about all the steps. It will be easy to debug based on which step it fails.
Types/code can be generated or updated in one of the following methods:
F1 for Windows or
F1 for Mac
onSave flag in the
extension config will generate types automatically on every save. Useful during development phase
P and select
GraphQL Codegen command
VS Code Command
Basic knowledge of GraphQL Code generator is required to make the best use of this extension.
Add support for
This is the initial release of the extension. I expect the users to send feedback and file issues to the repo. Also, contributions are welcome.