Class: GraphQLActiveRecordResolvers::AssociationTree
- Inherits:
-
Object
- Object
- GraphQLActiveRecordResolvers::AssociationTree
- Defined in:
- lib/graphql_activerecord_resolvers/association_tree.rb
Instance Attribute Summary collapse
-
#irep_node ⇒ Object
readonly
Returns the value of attribute irep_node.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #includes_arguments ⇒ Object
-
#initialize(klass, ctx) ⇒ AssociationTree
constructor
A new instance of AssociationTree.
Constructor Details
#initialize(klass, ctx) ⇒ AssociationTree
Returns a new instance of AssociationTree.
5 6 7 8 |
# File 'lib/graphql_activerecord_resolvers/association_tree.rb', line 5 def initialize(klass, ctx) @klass = klass @irep_node = ctx.irep_node end |
Instance Attribute Details
#irep_node ⇒ Object (readonly)
Returns the value of attribute irep_node.
3 4 5 |
# File 'lib/graphql_activerecord_resolvers/association_tree.rb', line 3 def irep_node @irep_node end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/graphql_activerecord_resolvers/association_tree.rb', line 3 def klass @klass end |
Instance Method Details
#includes_arguments ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/graphql_activerecord_resolvers/association_tree.rb', line 10 def includes_arguments @includes_arguments ||= Association. new( klass: klass, irep_node: irep_node, root: true, ). build_includes_arguments end |