Setting up GraphQL services

Set up up a GraphQL server using a custom Node.js file. This customization creates a GraphQL schema and resolver code from a set of OpenAPI specifications. It is dependent on the express, express-GraphQL, GraphQL, and OpenAPI-to-GraphQL packages.

Setting up a GraphQL Docker container

Once you have the Docker image, start the Docker container and use its URL to directly access the GraphL.
  1. The Docker image is based on node:14-alpine.
  2. The Docker image connects to the port 3100 (non ssl port) and port 3443 (ssl port) in container.
  3. To run the Docker image;
    • Run a command similar to Docker run docker run -d --name yourdockerName -p 3443:3443 -e LICENSE=accept release_number/graphql-app:tag
    • Then you can access GraphQL at http://localhost:3100/graphql or http://localhost:3443/graphql from within a web browser.
Note: For more information on how to create custom json patch files and use them, see HCL Commerce GraphQL extensions.