Class: Zenaton::Services::GraphQL::KillWorkflowMutation
- Inherits:
-
BaseOperation
- Object
- BaseOperation
- Zenaton::Services::GraphQL::KillWorkflowMutation
- Defined in:
- lib/zenaton/services/graph_ql/kill_workflow_mutation.rb
Overview
Mutation parameters for stopping a workflow
Instance Method Summary collapse
-
#body ⇒ Object
The body of the GraphQL request.
-
#initialize(name, custom_id, app_env) ⇒ KillWorkflowMutation
constructor
A new instance of KillWorkflowMutation.
-
#raw_query ⇒ Object
The query to be executed.
-
#variables ⇒ Object
The variables used in the query.
Methods inherited from BaseOperation
Constructor Details
#initialize(name, custom_id, app_env) ⇒ KillWorkflowMutation
Returns a new instance of KillWorkflowMutation.
10 11 12 13 14 15 |
# File 'lib/zenaton/services/graph_ql/kill_workflow_mutation.rb', line 10 def initialize(name, custom_id, app_env) super @name = name @custom_id = custom_id @app_env = app_env end |
Instance Method Details
#body ⇒ Object
The body of the GraphQL request
18 19 20 |
# File 'lib/zenaton/services/graph_ql/kill_workflow_mutation.rb', line 18 def body { 'query' => query, 'variables' => variables } end |
#raw_query ⇒ Object
The query to be executed
23 24 25 26 27 28 29 30 31 |
# File 'lib/zenaton/services/graph_ql/kill_workflow_mutation.rb', line 23 def raw_query <<~GQL mutation killWorkflow($input: KillWorkflowInput!) { killWorkflow(input: $input) { id } } GQL end |
#variables ⇒ Object
The variables used in the query
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/zenaton/services/graph_ql/kill_workflow_mutation.rb', line 34 def variables { 'input' => { 'customId' => @custom_id, 'environmentName' => @app_env, 'intentId' => intent_id, 'programmingLanguage' => 'RUBY', 'name' => @name } } end |