The GraphQL Responders simplifies the use of GraphQL by providing a form view for configuring responses. Each Message Responder responds to incoming request messages that match its Responder Correlation criteria. Responses can be configured in a variety of modes, ranging from simple fixed messages to dynamic parameterized messages using a data source. Message Responders are protocol agnostic, but the transport protocol or API to access a responder is defined in the deployment configuration of the PVA.

You can create a GraphQL Message Responder tool directly from the Add Responder wizards. This responder is preconfigured as follows:

SettingConfiguration
Definition tab > Service definitionGraphQL SDL
Response tab > Input ModeForm JSON
Options tab > Request Handling > Convert incoming request to XML before applying responder correlationEnabled
Options tab > Request Handling > Convert incoming request to XML using different message format than responseEnabled

GraphQL SDL service definition allows you to enter the location of a GraphQL SDL to which to constrain the responder. For details on configuring Message Responders that are constrained to a GraphQL SDL, see Definition Tab. You can define custom scalars used in your SDL in the preferences (go to Parasoft > Preferences > GraphQL). See Additional Preference Settings for more information.

Form JSON input mode allows you to define and parameterize JSON payloads via a graphical interface (as described in Form JSON). Note: The GraphQL "extensions" field is not supported in Form JSON. Use Literal input mode to add "extensions".

All of the available configuration options for this type of message responder are covered in Message Responder Overview.

For tips on virtualizing JSON services, see Using JSON.

  • No labels