GraphQL
Seamlessly integrate GraphQL with your favorite APIs, databases, and programming languages, using WayScript.
Execute queries against a GraphQL API.

Inputs

  1. 1.
    API URL - This is the root url for the API query.
  2. 2.
    Headers - You can create the custom headers that you pass with the API request.
    1. 1.
      Note - Variables use raw syntax here so String Pills need to be wrapped in quotes.
  3. 3.
    Code - Enter your GraphQL query here.

Advanced:

  1. 1.
    Use JSON - Defaults to True.
  2. 2.
    Fetch Schema from Transport - Defaults to True.
  3. 3.
    Number of Retries - Defaults to 3
    1. 1.
      Options: 0, 1, 2 ,3

Output

  1. 1.
    Response - A struct will return with the JSON response from your API query.

Example

Using the API URL found here, we can access country calling codes with a GraphQl like:
1
query {
2
CallingCode {
3
name
4
countries {
5
name
6
}
7
}
8
}
Copied!
Which would return a response like this:
1
{ "CallingCode": [
2
{ "name" : Int Type,
3
"Countries" : [
4
{
5
"name" : String Type
6
}
7
]
8
}
9
]
10
}
11
Copied!
A public script using this can be found here.
Last modified 1yr ago
Export as PDF
Copy link