Class: GraphQL::Client::Aws
- Inherits:
-
HTTP
- Object
- HTTP
- GraphQL::Client::Aws
- Defined in:
- lib/graphql/client/aws.rb
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(uri, **opts, &block) ⇒ Aws
constructor
A new instance of Aws.
Constructor Details
#initialize(uri, **opts, &block) ⇒ Aws
Returns a new instance of Aws.
9 10 11 12 13 14 15 16 17 |
# File 'lib/graphql/client/aws.rb', line 9 def initialize(uri, **opts, &block) appsync_opts = opts.merge(service: 'appsync') @signer = ::Aws::Sigv4::Signer.new(appsync_opts) if block_given? super(uri, &block) else super(uri) end end |
Instance Method Details
#connection ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/graphql/client/aws.rb', line 19 def connection SignedHTTP.new(uri.host, uri.port).tap do |client| client.signer = @signer client.uri = uri client.use_ssl = uri.scheme == "https" end end |