graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Remove requirement for headers function in configuration

Open rlgreen91 opened this issue 6 years ago • 0 comments

It appears that, when configuring the client, I always need to pass in a header function for GraphQL::Client::HTTP.new, even if it ends up being something like this:

def headers(_context)
  {}
end

Removing that causes a nil class error. Is it possible to make the configuration flexible such that not passing a header function at all is the equivalent of an empty hash?

rlgreen91 avatar Aug 14 '18 20:08 rlgreen91