Class: Graphlyte::Editors::Canonicalize
- Inherits:
-
Object
- Object
- Graphlyte::Editors::Canonicalize
- Defined in:
- lib/graphlyte/editors/canonicalize.rb
Overview
Reduce the query to a canonical form.
Instance Method Summary collapse
Instance Method Details
#edit(doc) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/graphlyte/editors/canonicalize.rb', line 11 def edit(doc) doc = doc.dup InlineFragments.new.edit(doc) doc.definitions = doc.definitions.sort_by(&:name) # TODO: we should also perform the selection Merge operation here. order_argments.edit(doc) end |