Module: Graphiti::Resource::Configuration

Extended by:
ActiveSupport::Concern
Included in:
Graphiti::Resource
Defined in:
lib/graphiti/resource/configuration.rb

Defined Under Namespace

Modules: Overrides

Constant Summary collapse

DEFAULT_MAX_PAGE_SIZE =
1_000

Instance Method Summary collapse

Instance Method Details

#adapterObject



274
275
276
# File 'lib/graphiti/resource/configuration.rb', line 274

def adapter
  @adapter ||= self.class.adapter.new(self)
end

#all_attributesObject



310
311
312
# File 'lib/graphiti/resource/configuration.rb', line 310

def all_attributes
  self.class.all_attributes
end

#attributesObject



302
303
304
# File 'lib/graphiti/resource/configuration.rb', line 302

def attributes
  self.class.attributes
end

#default_filtersObject



314
315
316
# File 'lib/graphiti/resource/configuration.rb', line 314

def default_filters
  self.class.default_filters
end

#extra_attributesObject



306
307
308
# File 'lib/graphiti/resource/configuration.rb', line 306

def extra_attributes
  self.class.extra_attributes
end

#filtersObject



278
279
280
# File 'lib/graphiti/resource/configuration.rb', line 278

def filters
  self.class.filters
end

#get_attr(name, flag, request: false, raise_error: false) ⇒ Object



270
271
272
# File 'lib/graphiti/resource/configuration.rb', line 270

def get_attr(name, flag, request: false, raise_error: false)
  Util::AttributeCheck.run(self, name, flag, request, raise_error)
end

#get_attr!(name, flag, options = {}) ⇒ Object



265
266
267
268
# File 'lib/graphiti/resource/configuration.rb', line 265

def get_attr!(name, flag, options = {})
  options[:raise_error] = true
  get_attr(name, flag, **options)
end

#grouped_filtersObject



282
283
284
# File 'lib/graphiti/resource/configuration.rb', line 282

def grouped_filters
  self.class.grouped_filters
end

#paginationObject



298
299
300
# File 'lib/graphiti/resource/configuration.rb', line 298

def pagination
  self.class.pagination
end

#sort_allObject



286
287
288
# File 'lib/graphiti/resource/configuration.rb', line 286

def sort_all
  self.class.sort_all
end

#sortsObject



290
291
292
# File 'lib/graphiti/resource/configuration.rb', line 290

def sorts
  self.class.sorts
end

#statsObject



294
295
296
# File 'lib/graphiti/resource/configuration.rb', line 294

def stats
  self.class.stats
end