Class: ActiveGraphql::Client::Adapters::FormatMultipartVariables

Inherits:
Object
  • Object
show all
Defined in:
lib/active_graphql/client/adapters/format_multipart_variables.rb

Overview

Converts deeply nested File instances to Faraday::UploadIO

Instance Method Summary collapse

Constructor Details

#initialize(variables) ⇒ FormatMultipartVariables

Returns a new instance of FormatMultipartVariables.



14
15
16
# File 'lib/active_graphql/client/adapters/format_multipart_variables.rb', line 14

def initialize(variables)
  @variables = variables
end

Instance Method Details

#callObject



18
19
20
21
22
# File 'lib/active_graphql/client/adapters/format_multipart_variables.rb', line 18

def call
  deep_transform_values(variables) do |variable|
    variable_value(variable)
  end
end