Skip to content

Instantly share code, notes, and snippets.

@flavio-b
flavio-b / simple_graphql_wrapper.rb
Created November 28, 2018 07:03
A simple GraphQL wrapper around Faraday.
require 'faraday'
require 'json'
class GraphQLClient
class << self
attr_accessor :base_site, :base_headers
def base_headers
@base_headers ||= {
'Content-Type' => 'application/json',