Request ​Request

yaml
type: "io.kestra.plugin.graphql.request"
yaml
id: graphql_request
namespace: company.team

tasks:
  - id: graphql_query
    type: io.kestra.plugin.graphql.Request
    uri: https://example.com/graphql
    query: |
      query GetUser($userId: ID!) {
        user(id: $userId) {
          name
          email
        }
      }
    variables:
      userId: "12345"

yaml
id: graphql_with_auth
namespace: company.team

tasks:
  - id: get_data
    type: io.kestra.plugin.graphql.Request
    uri: https://example.com/graphql
    headers:
      Authorization: "Bearer {{ secret('API_TOKEN') }}"
    query: |
      query {
        viewer {
          name
          email
        }
      }

yaml
id: graphql_with_operation_name
namespace: company.team

tasks:
  - id: get_data
    type: io.kestra.plugin.graphql.Request
    uri: https://example.com/graphql
    query: |
      query GetUser {
        user(id: "1") {
          name
        }
      }

      query GetPosts {
        posts {
          title
        }
      }
    operationName: "GetUser"
Properties
Default application/json
Default false
Default false
SubType string
Default POST
Default { "followRedirects": "true", "allowFailed": "false", "defaultCharset": "UTF-8" }
SubType array
Format uri
Format duration
Default PT5M
Format duration
Default false
SubType integer
Default UTF-8
Default true
SubType string
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY
Default DIRECT
Possible Values
DIRECTHTTPSOCKS