Class: Zenaton::Services::GraphQL::SendEventMutation
- Inherits:
-
BaseOperation
- Object
- BaseOperation
- Zenaton::Services::GraphQL::SendEventMutation
- Defined in:
- lib/zenaton/services/graph_ql/send_event_mutation.rb
Overview
Mutation parameters for sending an Event to a Workflow
Instance Method Summary collapse
-
#body ⇒ Object
The body of the GraphQL request.
-
#initialize(name, custom_id, event, app_env) ⇒ SendEventMutation
constructor
A new instance of SendEventMutation.
-
#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, event, app_env) ⇒ SendEventMutation
Returns a new instance of SendEventMutation.
10 11 12 13 14 15 16 |
# File 'lib/zenaton/services/graph_ql/send_event_mutation.rb', line 10 def initialize(name, custom_id, event, app_env) super @workflow_name = name @custom_id = custom_id @event = event @app_env = app_env end |
Instance Method Details
#body ⇒ Object
The body of the GraphQL request
19 20 21 |
# File 'lib/zenaton/services/graph_ql/send_event_mutation.rb', line 19 def body { 'query' => query, 'variables' => variables } end |
#raw_query ⇒ Object
The query to be executed
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/zenaton/services/graph_ql/send_event_mutation.rb', line 24 def raw_query <<~GQL mutation sendEventToWorkflowByNameAndCustomId($input: SendEventToWorkflowByNameAndCustomIdInput!) { sendEventToWorkflowByNameAndCustomId(input: $input) { event { intentId } } } GQL end |
#variables ⇒ Object
The variables used in the query
37 38 39 |
# File 'lib/zenaton/services/graph_ql/send_event_mutation.rb', line 37 def variables { 'input' => input } end |