class Zenaton::Services::GraphQL::PauseWorkflowMutation

Mutation parameters for pausing a Workflow

Public Class Methods

new(name, custom_id, app_env) click to toggle source
# File lib/zenaton/services/graph_ql/pause_workflow_mutation.rb, line 10
def initialize(name, custom_id, app_env)
  super
  @name = name
  @custom_id = custom_id
  @app_env = app_env
end

Public Instance Methods

body() click to toggle source

The body of the GraphQL request

# File lib/zenaton/services/graph_ql/pause_workflow_mutation.rb, line 18
def body
  { 'query' => query, 'variables' => variables }
end
raw_query() click to toggle source

The query to be executed

# File lib/zenaton/services/graph_ql/pause_workflow_mutation.rb, line 23
        def raw_query
          <<~GQL
            mutation pauseWorkflow($input: PauseWorkflowInput!) {
              pauseWorkflow(input: $input) {
                id
              }
            }
          GQL
        end
variables() click to toggle source

The variables used in the query

# File lib/zenaton/services/graph_ql/pause_workflow_mutation.rb, line 34
def variables
  {
    'input' => {
      'customId' => @custom_id,
      'environmentName' => @app_env,
      'intentId' => intent_id,
      'programmingLanguage' => 'RUBY',
      'name' => @name
    }
  }
end