Class: Zenaton::Services::GraphQL::CreateWorkflowScheduleMutation
- Inherits:
-
BaseOperation
- Object
- BaseOperation
- Zenaton::Services::GraphQL::CreateWorkflowScheduleMutation
- Includes:
- Concerns::Workflow
- Defined in:
- lib/zenaton/services/graph_ql/create_workflow_schedule_mutation.rb
Overview
Mutation parameters for scheduling a Task
Constant Summary
Constants included from Concerns::Workflow
Concerns::Workflow::MAX_ID_SIZE
Instance Method Summary collapse
-
#body ⇒ Object
The body of the GraphQL request.
-
#initialize(workflow, cron, app_env) ⇒ CreateWorkflowScheduleMutation
constructor
A new instance of CreateWorkflowScheduleMutation.
-
#raw_query ⇒ Object
The query to be executed.
-
#variables ⇒ Object
The variables used in the query.
Methods inherited from BaseOperation
Constructor Details
#initialize(workflow, cron, app_env) ⇒ CreateWorkflowScheduleMutation
Returns a new instance of CreateWorkflowScheduleMutation.
14 15 16 17 18 19 20 |
# File 'lib/zenaton/services/graph_ql/create_workflow_schedule_mutation.rb', line 14 def initialize(workflow, cron, app_env) super @workflow = workflow @cron = cron @app_env = app_env validate_custom_id end |
Instance Method Details
#body ⇒ Object
The body of the GraphQL request
23 24 25 |
# File 'lib/zenaton/services/graph_ql/create_workflow_schedule_mutation.rb', line 23 def body { 'query' => query, 'variables' => variables } end |
#raw_query ⇒ Object
The query to be executed
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/zenaton/services/graph_ql/create_workflow_schedule_mutation.rb', line 28 def raw_query <<~GQL mutation ($input: CreateWorkflowScheduleInput!) { createWorkflowSchedule(input: $input) { schedule { id } } } GQL end |
#variables ⇒ Object
The variables used in the query
41 42 43 |
# File 'lib/zenaton/services/graph_ql/create_workflow_schedule_mutation.rb', line 41 def variables { 'input' => input } end |