Configuring API Connect for GraphQL

Configure API Connect for GraphQL by modifying the settings in the cr.yaml Custom Resources (CR) file and applying the updated CR to the deployment.

Applying an updated configuration

After you modify the CR, apply it by running the following command (for OCP, replace kubectl with oc):

kubectl apply -f StepZenGraphServer.yaml

Then run the following command to verify that changes were successfully applied (for OCP, replace kubectl with oc):

kubectl get StepZenGraphServer 

If the configuration changes completed successfully, you see a message similar to the following example, which indicates that the API Connect for GraphQL Graph Service is running in your cluster:

NAME      STATUS   SUMMARY              AGE
stepzen   Ready    Services are ready   1m

Per-service configuration settings

There are two services configuration sections: graphServer and graphServerSubscription. These define service parameters such as scaling parameters, pod annotations, and node affinities for each of the two services.

The graphServer section is required and the graphServerSubscription section is optional. The fields of both are identical.

You must define the limits and horizontal scaling parameters for the two services separately. The optimal values will depend on the capacity of your nodes, how many requests of each sort (query/subscription) you expect per unit of time, and how responsive your application needs to be.

Note: For details about the common and service related configuration settings, see CR configuration settings