Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2022.1

SOAtest and Virtualize can make HTTP calls using the GraphQL query language, letting you retrieve specific data from multiple sources in a single call. This topic explains how to configure and apply use the GraphQL Client tool, which.... Messages can be sent with HTTP GET or POST. You can use GraphQL Client tools in SOAtest and Virtualize. 

Sections include:

Table of Contents
maxLevel1

...

The Query tab allows you to specify the GraphQL query for the message that will be sent. Specify the name of the operation to be sent at runtime in the Operation Name field. This is particularly important if the query contains multiple operations.

Image Removed

Before you specify the query, be sure to select a media type supported by your GraphQL service from the Content-Type drop-down list. The request structure will be transformed at runtime based on this selection. The available options are:

Content TypeHTTP MethodRequest Structure
application/jsonPOST
HTTP body is a JSON object of the form:
Code Block
{
  "query": "...",
  "operationName": "...",
   "variables": {
   
Unknown
 
macro:
 
{
  "myVariable" : "
myVariable
..."
       }
}
application/graphql+jsonPOSTSame as "application/json" above.
application/graphqlPOSTQuery sent in HTTP body. Variables and operation name sent in query string.
application/x-www-form-urlencodedPOSTQuery, variables, and operation name sent as URL-encoded string in HTTP body.
N/AGETQuery, variables, and operation name sent as parameters in query string.

You can then select either Literal View Options_SOA or Scripted View Options_SOA from the Input Mode drop-down list and choose either the Text or File option. The Text option enables you to manually add your script in a text input field while the File option allows you to browse for an external script file that will be executed when the tool is called.

Specify the name of the operation to be sent at runtime in the Operation Name field. This is particularly important if the query contains multiple operations.

Image Added

Add any variables declared in the query in the Variables table.

Image Added

HTTP Options Tab

...