Config file reference

CLI reference

The CLI for the GraphQL SDK Generator only requires one parameter: the path to the configuration file. All other configurations are defined within the file passed to the CLI.

graphql-sdk-generator -c config.json 

File Config

The following are the available options that can be included in the config.json file:

{
  "url": "https://your-end-point",
  "sdkName": "custom-sdk-name",
  "fileType": "ts",
  "debug": true, 
  "baseDirectory": "custom-directory-path-name",
  "directoryName": "custom-name",
  "depth": 2,
  "toGenerateSchemaFile": false,
  "headers": {
    "x-api-key": "api-key",
    ...more headers
  }
  
}

Each option allows for customization, making the generated SDK more tailored to your needs. Simply adjust the values in the config.json file to fit your project.

Last updated