lib/gqli/clients/contentful.rb in gqli-1.0.0 vs lib/gqli/clients/contentful.rb in gqli-1.1.0

- old
+ new

@@ -2,19 +2,20 @@ module GQLi # Module for creating a Contentful GraphQL client module Contentful # Creates a Contentful GraphQL client - def self.create(space, access_token, environment: nil, validate_query: true) + def self.create(space, access_token, environment: nil, validate_query: true, options: {}) api_url = "https://graphql.contentful.com/content/v1/spaces/#{space}" api_url += "/environments/#{environment}" unless environment.nil? GQLi::Client.new( api_url, headers: { 'Authorization' => "Bearer #{access_token}" }, - validate_query: validate_query + validate_query: validate_query, + options: options ) end end end