Module: GraphitiGql::SortAliasExtras

Defined in:
lib/graphiti_gql/graphiti_hax.rb

Instance Method Summary collapse

Instance Method Details

#each_sortObject



241
242
243
244
245
246
247
248
# File 'lib/graphiti_gql/graphiti_hax.rb', line 241

def each_sort
  sort_param.each do |sort_hash|
    name = sort_hash.keys.first
    name = resource.all_attributes[name][:alias] || name
    direction = sort_hash.values.first
    yield name, direction
  end
end