Class: Graphiti::ActiveGraph::Scoping::Include
- Inherits:
-
Scoping::Base
- Object
- Scoping::Base
- Graphiti::ActiveGraph::Scoping::Include
- Defined in:
- lib/graphiti/active_graph/scoping/include.rb
Overview
Handles sideloading via scoping instead of sideloading query as in original jsonapi_suite This avoids extra queries for fetching sideload
Instance Method Summary collapse
Methods included from Graphiti::ActiveGraph::Scoping::Internal::SortingAliases
#add_extra_vars_to_query?, #deep_sort_keys, #sort_keys, #with_vars_for_sort
Instance Method Details
#apply_standard_scope ⇒ Object
12 13 14 15 16 |
# File 'lib/graphiti/active_graph/scoping/include.rb', line 12 def apply_standard_scope return scope if normalized_includes.empty? self.scope = resource.handle_includes(scope, normalized_includes, normalized_sorts, with_vars: with_vars_for_sort, paginate: paginate?) end |
#custom_scope ⇒ Object
8 9 10 |
# File 'lib/graphiti/active_graph/scoping/include.rb', line 8 def custom_scope nil end |