Changing GraphQL server configuration

The HCL Commerce GraphQL server exposes many configuration options through a yaml or json file included in the container. A majority of the settings influence the Openapi to GraphQL translation, however a few others regulate the HTTP or HTTPS connection behaviour while GraphQL is functioning as both a server or client.

For detailed information about the available values, see the comments in the default yaml file that may be extracted from an image container using Docker commands. If the image is tagged with graphql-app:latest, execute the following commands;

  • % docker create --name=temp graphql-app:latest
  • % docker cp temp:/package/opts.yaml opts.yaml
  • % docker rm temp
Note: Instead of modifying the image's default file, create one or more extra yaml or json files with the new values for the parameters you wish to alter, and place them in the /SETUP/Custom/opts directory. The server will read the default file first, then the custom files, with the last setting taking precedence in the event of a disagreement.

You can experiment easily with different configuration settings and other custom extensions by volume mounting a host directory onto the path /SETUP/Custom in the container during development.