Sha256: 6e5f29379d22e4e27c960a176ca5c7050d7f33ab518145d294a0dc37892d4179
Contents?: true
Size: 627 Bytes
Versions: 15
Compression:
Stored size: 627 Bytes
Contents
module GraphitiGraphQL class Util def self.with_gql_context original = Graphiti.context[:graphql] Graphiti.context[:graphql] = true yield ensure Graphiti.context[:graphql] = original end # Should probably be in graphiti itself def self.parse_sort(raw) if raw.is_a?(Array) sorts = [] raw.each do |sort| sort = sort.symbolize_keys att = sort[:att].to_s.underscore att = "-#{att}" if [:desc, "desc"].include?(sort[:dir]) sorts << att end sorts.join(",") else raw end end end end
Version data entries
15 entries across 15 versions & 1 rubygems